Hi,

At Tue, 9 Aug 2005 11:36:09 +0900,
Trans wrote in [ruby-talk:151317]:
> 
>   class D
>     def initialize(&blk)
>        @blk = blk
>     end
> 
>     def lambda_return
>       lambda { return 'Y' }.call ; 'N'
>     end
> 
>     def proc_return
>       Proc.new { return 'Y' }.call ; 'N'
>     end
> 
>     def lambda_return_blk
>       lambda(&@blk).call ; 'N'
>     end
> 
>     def proc_return_blk
        Proc.new(&@blk).call
      rescue LocalJumpError => e
        raise unless e.backtrace.size == caller.size+2
        e.exit_value
      else
        'N'
>     end
> 
>   end

-- 
Nobu Nakada