-
-
Save axiak/2934604 to your computer and use it in GitHub Desktop.
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
class String | |
def my_reverse | |
reversed = [] | |
self.each_char do |char| | |
reversed.unshift(char) | |
end | |
reversed.join('') | |
end | |
end | |
puts 'Drink from the mirror and see thyself in the moon..' #crappy made up schonberg reference | |
puts 'foolish mortal:' | |
dasMonDestrunken = gets | |
puts dasMonDestrunken.my_reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment