Created
July 4, 2016 02:50
-
-
Save wycats/5baf3d411cc121a9b8446b64cf9d2487 to your computer and use it in GitHub Desktop.
https://repl.it/C82p/0 created by wycats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poem = | |
"My honeydew has flown from my hand | |
And my toast has gone to the | |
moon. | |
But when I saw it on television, | |
Planting our flag on Halley's | |
comet, | |
More still did I want to eat it. | |
" | |
p poem.lines | |
p poem.lines.map(&:chomp) | |
p poem.lines | |
p poem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] | |
>>> ["My honeydew has flown from my hand\n", "And my toast has gone to the\n", " moon.\n", "But when I saw it on television,\n", "Planting our flag on Halley's\n", " comet,\n", "More still did I want to eat it.\n"] | |
["My honeydew has flown from my hand", "And my toast has gone to the", " moon.", "But when I saw it on television,", "Planting our flag on Halley's", " comet,", "More still did I want to eat it."] | |
["My honeydew has flown from my hand\n", "And my toast has gone to the\n", " moon.\n", "But when I saw it on television,\n", "Planting our flag on Halley's\n", " comet,\n", "More still did I want to eat it.\n"] | |
"My honeydew has flown from my hand\nAnd my toast has gone to the\n moon.\nBut when I saw it on television,\nPlanting our flag on Halley's\n comet,\nMore still did I want to eat it.\n" | |
=> "My honeydew has flown from my hand\nAnd my toast has gone to the\n moon.\nBut when I saw it on television,\nPlanting our flag on Halley's\n comet,\nMore still did I want to eat it.\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment