On Wed, Nov 12, 2008 at 07:24:16AM +0900, Charles Oliver Nutter wrote:
> Roger Pack wrote:
>>     p = proc do |arg|
>>       return if arg == 17
>>       puts arg
>>     end
>>
>>     p[1]  # prints "1"
>>     p[17] # prints nothing
>>
>>     p = Proc.new do |arg|
>>       return if arg == 17
>>       puts arg
>>     end
>>
>>     p[1]  # prints "1"
>>     p[17] # raises LocalJumpError
>
> In 1.8 "proc" means "lambda" and "lambda" can be returned from. I think  
> a similar behavioral difference still exists in Ruby 1.9.

In 1.9, proc has been changed so it's an alias for Proc.new rather than
lambda.