Ruby (Matz) , . Ruby 24 1993 1995 . , Ruby: . pearl , . ruby .
-, , .
:
Ruby 23 1993 . - . (Perl4, Perl5), ( ). - . . , - . OO . , - , , , -, . , .
. , . , , , . . 1995 Ruby 0.95 . , . . , ruby-list, 14789 .
Ruby 1995 , . 1997 Ruby , 1998 ruby-talk. . , . Ruby GNU/Linux, .
, - , , , , -, Python. Ruby , , , .
: , . , Ruby , . , , , .
Ruby . , . , , , , .
, . , , ( , ), .
- , , , . , . , , , .
(. Ruby Way). , , , , , , , , . .
a = "abcdefg" => "abcdefg" b = a => "abcdefg" b => "abcdefg" a[3] = 'R' => "R" b => "abcRefg"a b, . , , , - (, , Object Pascal).
# : # # = , # " - , str = "" # str, String # def - def str.bye # str. , ( Object) # bye - , , # "!" # ( - ) end # end Ruby # puts - , # str.bye - bye str # , bye puts # puts str.bye #=> !, Ruby . str.
# if , , , # then else, else end puts( if 5 > 3 then "" else "" end ) #=> # var, # var, puts( var = 5 ) #=> 5Ruby. , .
# a = [1, 'hi', 3.14, 1, 2, [4, 5] * 3] # => [1, "hi", 3.14, 1, 2, [4, 5, 4, 5, 4, 5]] # a[2] # => 3.14 # , a.flatten.uniq # => [1, 'hi', 3.14, 2, 4, 5] # 4 a.index(4) # => nil # - # , Ruby # , !, # a.flatten! # => [1, "hi", 3.14, 1, 2, 4, 5, 4, 5, 4, 5] a.index(4) # => 5
{ puts "Hello, World!" } do puts "Hello, World!" end:
File.open('file.txt', 'w') { |file| # file.txt (w - write) file.puts 'Wrote some text.' } # :, Ruby ( 0 10 ):
(0..10).collect{|v| v ** 2 }.select{ rand(2) == 1 }.each_with_index{|v,i| printf "%2d\t%2d\n", i, v }
class Person # class, # include Comparable # [[b:Ruby//Comparable|Comparable]] # <, <=, ==, >=, > between? # # <=> # @@count_obj = 0 # # # new def initialize(name, age) # name, age - # @ @name, @age = name, age # c 1 @@count_obj += 1 end def <=>(person) # <=> # ( sort @age <=> person.age # , end def to_s # puts "#{@name} (#{@age})" # #{x} 2- Ruby x end def inspect # to_s, "<#{@@count_obj}:#{to_s}>" end # : # attr_reader :name, :age end # group = [ Person.new("John", 20), Person.new("Markus", 63), Person.new("Ash", 16) ] # => [<3:John (20)>, <3:Markus (63)>, <3:Ash (16)>] # irb inspect # puts group.sort.reverse # : # Markus (63) # John (20) # Ash (16) # , # ( <=>) Comparable group[0].between?(group[2], group[1]) # => trueRuby : , , JRuby Java, .NET IronRuby ( ), Rubinius Ruby Smalltalk-80 VM.
$ irb irb(main):001:0> "Hello, World" => "Hello, World" irb(main):002:0> 2 ** 256 # ** - => 115792089237316195423570985008687907853269984665640564039457584007913129639936irb =>. =>. irb .
ActiveState Komodo IDE | GNU/Linux, Mac OS X, Solaris, Windows | http://activestate.com/Products/komodo_ide/ | |
Arachno Ruby IDE | Win 2000/XP, GNU/Linux | http://www.ruby-ide.com | |
Aptana (RadRails+RDT) | CPL | Java | http://www.aptana.com/ |
Eclipse + RDT | CPL | Java | RDT Homepage |
FreeRIDE | Ruby License | Windows, OS X, POSIX | http://freeride.rubyforge.org/ |
IntelliJ IDEA + Ruby plugin | ( IDEA), Apache 2.0 ( plugin) | Java, JRuby | Ruby plugin |
KDevelop | GNU GPL | Linux | http://kdevelop.org/ |
Mondrian Ruby IDE | MIT | Ruby ( + FOX toolkit) | http://www.mondrian-ide.com/ |
NetBeans IDE | CDDL | Java | http://www.netbeans.org/features/ruby/ |
RDE | Ruby License | Windows | http://homepage2.nifty.com/sakazuki/rde_en/ |
Ruby in steel | Visual Studio 2005 | http://www.sapphiresteel.com/ | |
Xcode 3.1 | Mac OS X 10.5 | http://developer.apple.com/tools/xcode/ |
|
Ruby. | 1.0 |
|
, 0. | 1.0 |
|
( , . .). . | 1.2 |
|
, (. . ). | 1.4 |
|
, . | 1.0 |
|
. . | 1.0 |
|
( 30 ) | 1.0 |
|
false . |
1.0 |
|
-; . | 1.0 |
|
-. | 1.0 |
|
. | 1.0 |
|
. , $& , $' , $` , $1 , $2 . . |
1.0 |
|
, ( ). . | 1.2 |
|
. | 1.0 |
|
; Ruby , Class (). | 1.0 |
|
nil . nil false . . |
1.0 |
|
. | 1.0 |
|
. . | 1.0 |
|
. Fixnum , . |
1.0 |
|
, (32 ). , Bignum. | 1.0 |
|
. | 1.0 |
|
(), . | 1.0 |
|
: , . | 1.0 |
|
. | 1.0 |
|
. | 1.0 |
|
; , . | 1.0 |
|
:name . . |
1.6 |
|
, Ruby. | 1.0 |
|
. ThreadGroup . . |
1.6 |
|
. | 1.0 |
|
true . |
1.0 |
|
, . Method .. |
1.6 |
Ruby , , .
Ruby DBI ( SQLite, Oracle, ODBC, MySQL, DB2, MS SQL, InterBase, ADO .). , . ORM , ActiveRecord, DataMapper Sequel.
FxRuby FOX, wxRuby ( c wxWidgets C++), QtRuby/Korundum Qt KDE , Tk Gtk. OpenGL, .
Win32utils Win32 API.
Rmagick , 90 ( ImageMagick GraphicsMagick).
Ruport (Ruby reports) CSV. PDF, HTML, CSV TXT.
RuTils Ruby. . 231.propisju(2) => 341.propisju_items(1, , , ) => . .
Ruby RubyGems (. gems, gem ).
Ruby RAA (Ruby Application Archive). 2007 . , Ruby, RubyForge, .
FreeRIDE IDE Ruby, FxRuby. (LGPL, Ruby) .
RDoc Ruby . - , Ruby.
Ruby Unix ri. , Ruby. - http://www.ruby-doc.org.
KOffice Kross, , Ruby.
WATIR (. Web Application Testing in Ruby) - .
Ruby :
( ). Ruby - .
( Unix- ), 1.9.
( , 1.9).
. ( Ruby Java .NET , JRuby Ruby.NET). 2.0 YARV, Ruby . , , Rubinus Maglev.
10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _. 10.11.2021 - 12:36: - Conscience -> . ? - _. 10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _. 10.11.2021 - 12:35: - Ecology -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> . - _. 10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _. 10.11.2021 - 09:18: - New Technologies -> , 5G- - _. 10.11.2021 - 09:18: - Ecology -> - _. 10.11.2021 - 09:16: - Ecology -> - _. 10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _. 10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _. |