Skip to content

Instantly share code, notes, and snippets.

@xander-miller

xander-miller/reversi.rb

Last active Dec 3, 2015
Embed
What would you like to do?
Rewriting the string reverse method.
def reversi str = ""
out = ''
1.upto str.length do |i|
out << str.chars[-i]
end
out
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment