Skip to content

Instantly share code, notes, and snippets.

@solomon081
Created June 1, 2012 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solomon081/2852650 to your computer and use it in GitHub Desktop.
Save solomon081/2852650 to your computer and use it in GitHub Desktop.
Unpack Array
Array.class_eval do
def unpack index
temp = self
self[index].map {|item| temp.push item}
temp.delete(self[index])
return temp
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment