Skip to content

Instantly share code, notes, and snippets.

@gr33n7007h
Created April 18, 2016 16:13
Show Gist options
  • Save gr33n7007h/799b0a258735db5e203b951cd810e99b to your computer and use it in GitHub Desktop.
Save gr33n7007h/799b0a258735db5e203b951cd810e99b to your computer and use it in GitHub Desktop.
id sort
[-1,9,5,3,6,7,12,45,23,-7,4,-12,-65].sort_by { |n| n.__id__ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment