Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
I hate this about ruby
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