Skip to content

Instantly share code, notes, and snippets.

@axiak
Forked from offby1/hmm.rb
Created June 15, 2012 04:00
Show Gist options
  • Save axiak/2934604 to your computer and use it in GitHub Desktop.
Save axiak/2934604 to your computer and use it in GitHub Desktop.
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