Created
January 9, 2014 15:47
-
-
Save yubrew/8336274 to your computer and use it in GitHub Desktop.
sort numerical array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr.sort{|x,y| x.to_i <=> y.to_i} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment