Skip to content

Instantly share code, notes, and snippets.

@moonmaster9000
Created April 14, 2011 15:51
Show Gist options
  • Save moonmaster9000/919767 to your computer and use it in GitHub Desktop.
Save moonmaster9000/919767 to your computer and use it in GitHub Desktop.
def my_reverse( a )
#... fill in this code
end
a = [1,2,3,4]
b = my_reverse a
puts b.inspect
#==> [4, 3, 2, 1]
puts a.inspect
#==> [1,2,3,4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment