Skip to content

Instantly share code, notes, and snippets.

@Groxx
Created April 17, 2010 07:08
Show Gist options
  • Save Groxx/369363 to your computer and use it in GitHub Desktop.
Save Groxx/369363 to your computer and use it in GitHub Desktop.
# This code
array = [0,1,2,3,4,5,6,7,8,9]
array[3..7] = array[3..7].reverse
puts array.inspect
# Results in this output
# [0, 1, 2, 7, 6, 5, 4, 3, 8, 9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment