Sophrinix / TryRuby

Try Ruby is a interactive shell that quickly and whimsically teaches the Ruby programming language. Originally _why's idea, it has been recreated from the ground up by Rubyists who have a passion for Ruby and for teaching their fellow (wo)man how to program.
tryruby.org
345 stars 80 forks source link

Why did the second toast change to honeydew? #167

Open rcpao opened 10 years ago

rcpao commented 10 years ago

To get to the other side?

poem.lines­.to_a.reve­rse => ["More still did I want to eat it. ", "Planting our flag on Halley's comet, ", "But when I saw it on television, ", "And my toast has gone to the moon. ", "My honeydew has flown from my hand "] Success! Notice there is honeydew and toast above.

print poem.­lines.to_a­.reverse.j­oin More still did I want to eat it. Planting our flag on Halley's comet, But when I saw it on television, And my honeydew has gone to the moon. My honeydew has flown from my hand Success! Notice there are now two honeydew and no toast.

Sophrinix commented 10 years ago

or maybe... just maybe the giraffe that stole mount hood also quietly stole the toast too... :-)

(i'll come back to the real reason for this soon)