Created
January 8, 2018 14:50
-
-
Save pointcom/ccecd229d55c8d55ed4683129d7e09aa to your computer and use it in GitHub Desktop.
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
# http://ruby-doc.org/core-2.5.0/Enumerable.html#method-i-min | |
# Ruby 2.2 | |
[1, 2, 3, 4, 5].min(2) | |
=> [1, 2] | |
[3, 4, 5].max(3) | |
=> [5, 4, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment