Created
June 15, 2012 03:58
-
-
Save offby1/2934600 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
def my_reverse(s) | |
reversed = [] | |
s.each_char do |char| | |
reversed.unshift(char) | |
end | |
reversed.join('') | |
end | |
puts my_reverse('Drink from the mirror and see thyself in the moon..') #crappy made up schonberg reference |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment