From: Yukihiro Matsumoto Date: 2006-12-16T00:19:20+09:00 Subject: Re: using Proc and yield Hi, In message "Re: using Proc and yield" on Sat, 16 Dec 2006 00:05:19 +0900, Alber Eric 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.