Ruby (programming language): Difference between revisions

Content deleted Content added
LittleDan (talk | contribs)
No edit summary
LittleDan (talk | contribs)
concatenation much faster than += for strings
Line 44:
string1 = "Hello world".gsub(" ", ",")
 
# appendconcatenate "!" to variable 'string1'
string1 +=<< "!"
 
# print variable 'string1', followed by a newline