From: Andy Bogdanov Date: 2010-06-28T21:52:13+09:00 Subject: passing a block to yield Hello I was trying to make an iterator that goes through a simple tree structure something like that: class Node ... def each_child(&block) @children.each { |child| yield(child) { child.each_child(&block) } } end ... end so i could generate a simple html menu: puts "" But it turns out that Ruby syntax prohibits passing blocks to yield. A simple workaround is to use block.call instead of yield everywhere. Is there any good reason for that limitation? -- Posted via http://www.ruby-forum.com/.