Created
January 28, 2016 21:24
-
-
Save avit/6be91ba2f35d8871c4b9 to your computer and use it in GitHub Desktop.
I hate this about ruby
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
lm = lambda { |things, *options| puts things.inspect, options.inspect } | |
pr = proc { |things, *options| puts things.inspect, options.inspect } | |
lm.call([1,2], 'a') #=> [1, 2], ["a"] | |
pr.call([1,2], 'a') #=> [1, 2], ["a"] | |
lm.call([1,2]) #=> [1, 2], [] | |
pr.call([1,2]) #=> 1, [2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment