From: Andy Bogdanov Date: 2010-06-29T06:32:33+09:00 Subject: Re: passing a block to yield > There is no point in passing a block to yield Maybe there always is a way to avoid using procs and lambdas, but i don't see other easy way in my case (see below). Proc#call accepts blocks, why does yield not? It's almost the same thing. > yield implicitly calls the block > passed to the current method. Thanks for the tip. Forgot that yield belongs to method context only. > def each_child(&b) > b[self] # or b.call(self) or simply yield self > @children.each {|ch| ch.each_child(&b)} > self > end This code will just pass all the elements to a block, there's no way to wrap lower levels into