Hi,

In message "Re: using Proc and yield"
    on Sat, 16 Dec 2006 00:05:19 +0900, Alber Eric <alberthier / yahoo.fr> writes:

|Now I wonder if the following code is valid :
|
|p = Proc.new { yield "hello world" }
|p.call { |i| puts i }

Proc is an objectified block that carries the context at the point.
Since no block is given at the point of Proc.new, it raises
LocalJumpError.

|I belived Proc.call was equivalent to a standard method call, it seems
|I'm wrong :). Did I misunderstand something? Can someone tell me where I
|made a mistake?

No, Proc#call is equivalent of yield.

							matz.