Last active
June 1, 2020 03:08
-
-
Save kleytonmr/52ee76a45a08fb2e41cfcb7938fbee47 to your computer and use it in GitHub Desktop.
Rassoc
This file contains hidden or 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.rassoc( key ) → an_array or nil | |
a = [[1, 'one'], [2, 'two'], [3, 'threee'], ['ii', 'two']] | |
a.rassoc('two') # => [2, "two"] | |
a.rassoc('four') # => nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment