There are several differences between Lambdas and Procs.
Lambdas have what are known as "diminutive returns". What that means is that a Lambda will return flow to the function that called it, while a Proc will return out of the function that called it.
def proc_demo Proc.new { return "return value from Proc" }.call "return value from method" end def lambda_demo lambda { return "return value from lambda" }.call "return value from method" end proc_demo #=> "return value from Proc" lambda_demo #=> "return value from method"
Lambdas check the number of parameters passed into them, while Procs do not. For example:
lambda { |a, b| [a, b] }.call(:foo) #=> #<ArgumentError: wrong number of arguments (1 for 2)> Proc.new { |a, b| [a, b] }.call(:foo) #=> [:foo, nil]