Ruby (programming language): Difference between revisions

Content deleted Content added
m Automated conversion
m +lang links eo, pl; tried to fix code sample (backslash problem?)
Line 1:
[[eo:Ruby Komputillingvo]][[pl:Ruby]]
'''Ruby''' is an [[object-oriented]] interpreted [[programming language]] with clean syntax. It has its roots in [[Perl programming language|Perl]], [[Smalltalk programming language|Smalltalk]], [[Python programming language|Python]], [[LISP programming language|LISP]] and [[CLU programming language|CLU]], with Perl being the most important one.
 
Line 34 ⟶ 35:
string1 = "Hello world" # assign "Hello world" string to variable 'string1'
string2 = string1.gsub(" ", ", ") # replace all " " by ", " in 'string1', put result into variable 'string2'
string2 += "!\n" # append "!\n" ("\n" is newline character) to variable 'string2'
string2 += "!
" # append "!
" ("
" is newline character) to variable 'string2'
print string2 # print variable 'string2'
</pre>
Line 51 ⟶ 49:
* Ruby FAQ: http://www.rubycentral.com/faq/rubyfaqall.html
* Ruby Garden: http://www.rubygarden.org/
 
 
----
[[talk:Ruby_programming_language|/Talk]]