From: mhm26@... (matt) Date: 2003-11-21T00:52:20+09:00 Subject: Re: break in yield/block > well, the problem is that you have written something strange. > > Your first example was > > def meow > yield > end > > meow do > puts "in block" > break > puts "leaving block" > end > > Your second example was > > p = proc do > puts "in proc" > break > puts "leaving proc" > end > > def meow(block) > block[] > end > > meow(p) The first example is the same as def meow yield end meow { puts "in proc" break puts "leaving proc" } The second example is more akin to def meow(&block) block[] end meow { puts "in proc" break puts "leaving proc" } than what you gave. Note that the only thing that changed is the definition of meow - not the invocation. Also - for my list example, I of course meant list_of_methods_args.each {|meth, *args| meth.call(*args, &special_magic) } as opposed to the original list_of_methods_args.each {|meth, *args| meth.call(args, &special_magic) } -- change is `meth.call(args' to meth.call(*args' --