Skip to content

Instantly share code, notes, and snippets.

@myronmarston
Created May 27, 2010 16:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save myronmarston/415986 to your computer and use it in GitHub Desktop.
>> p = Proc.new { |a, b| a }
=> #<Proc:0x00000001036962f8@(irb):2>
>> p.call(5)
=> 5
>> l = lambda { |a, b| a }
=> #<Proc:0x000000010368e8c8@(irb):4>
>> l.call(5)
ArgumentError: wrong number of arguments (1 for 2)
from (irb):4
from (irb):5:in `call'
from (irb):5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment