欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2/Agda, C++/Lisp/Haskell
Ruby
来自开放百科 - 灰狐
(版本间的差异)
小 (→Ruby版本) |
小 (→在线文档) |
||
| 第72行: | 第72行: | ||
==在线文档== | ==在线文档== | ||
| − | * | + | *[http://docs.huihoo.com/ruby/ruby-man-1.4/ Ruby 1.4.6] |
| − | * | + | *[http://docs.huihoo.com/ruby/rug/ Ruby User's Guide] |
| − | * | + | *[http://docs.huihoo.com/ruby/rails/api/ Rails Framework Documentation] |
==开源项目== | ==开源项目== | ||
2011年2月19日 (六) 03:21的版本
Ruby是一种功能强大的面向对象的脚本语言,她可以使您方便快捷地进行面向对象编程.Ruby使文本处理和系统管理变得简单,与Perl非常相似.一句话:简单明了,扩展性强,移植性好.
Ruby,是因為Perl的 發音與6月的誕生石pearl(珍珠)相同,因此Ruby以7月的誕生石ruby(紅寶石)命名
Ruby的几大亮点
- 语法简单
- 垃圾回收
- 可移植性
- 动态载入
- 完全免费
- 正则表达式
将 Ruby 带入企业级应用: Enterprise Ruby
目录 |
新闻
| |
您可以在Wikipedia上了解到此条目的英文信息 Ruby Thanks, Wikipedia. |
- CVE-2026-27820: Buffer overflow vulnerability in Zlib::GzipReader (05 Mar 2026 00:00)
- Ruby 3.2.10 Released (14 Jan 2026 01:22)
- Ruby 4.0.1 Released (13 Jan 2026 02:28)
- Ruby 4.0.0 Released (25 Dec 2025 00:00)
- A New Look for Ruby's Documentation (23 Dec 2025 00:00)
- Redesign our Site Identity (22 Dec 2025 05:46)
- Ruby 4.0.0 preview3 Released (18 Dec 2025 00:00)
- Ruby 3.4.8 Released (17 Dec 2025 00:24)
快速入门
% ruby -v % ruby -e 'puts "hello world"'
% irb // 进入 ruby 的交互模式
% echo "puts 'hello world'" > hello.rb % ruby hello.rb
# The Greeter class
class Greeter
def initialize(name)
@name = name.capitalize
end
def salute
puts "Hello #{@name}!"
end
end
# Create a new object
g = Greeter.new("world")
# Output "Hello World!"
g.salute
Ruby版本
- Ruby 1.9 变化 - http://opinion.rubytao.com/ruby/ruby-programming/post/12
- Ruby 1.8.5 - ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz
- Ruby 1.8.4 - ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.4.tar.gz
- Ruby 1.6.8, 1.8.1 - http://rubycn.ce-lab.net/man/index.html
- Ruby 1.4.6 - http://docs.huihoo.com/ruby/ruby-man-1.4/
开发指南
Standard Library
XML-RPC
require 'xmlrpc/client'
require 'pp'
server = XMLRPC::Client.new2("http://xmlrpc-c.sourceforge.net/api/sample.php")
result = server.call("sample.sumAndDifference", 5, 3)
More: http://docs.huihoo.com/ruby/stdlib/
gem
gem list # gem update --system # gem update --include-dependencies # gem install --remote rake
/usr/local/ruby/bin/rails:17: undefined method `require_gem' for main:Object (NoMethodError)
vi /usr/local/ruby/bin/rails change require_gem to gem
在线文档
开源项目
相关链接
- Ruby on Rails学习资料站点
- Ruby on Rails
- Huihoo Ruby Applications
- mod_ruby
- http://rubymanual.org/
- http://www.ruby-lang.org/en/
- Mac OS X用户 - http://www.rubycocoa.com/
- Ruby TAO - http://www.rubytao.com/
- Ruby Quiz - http://www.rubyquiz.com/
- Ruby中文社区
- Ruby中文开源项目平台
- Ruby on Rails
精彩图集
<discussion>characters_max=300</discussion>
分享您的观点

