Florian Gross wrote: >> This is why if you ever want to pass a given block >> to another method, you must capture it in a block argument, and also why >> yielding to a block is much faster than calling a proc (since there's >> less overhead in yielding than in calling a free-standing proc). > > def thrice() > 3.times { yield } > end > > thrice { puts "Hello World!" } > # >> Hello World! > # >> Hello World! > # >> Hello World! > > That doesn't have any impact on your original argument though. You > can't reimplement yield in Ruby with the reflection it offers right > now. Yeah, you're not redefining yield, you're wrapping a method that accepts a block with another method that accepts a block. There's no way to define a method that uses the current method's block, e.g.: # some magic to define my_yield here def foo my_yield(1) end foo {|x| puts x} There is another keyword that passes along the same block though: super. class A def foo yield end end class B < A def foo super end end B.new { puts 'here' } But we're just swapping keywords, and it's not generally applicable. - Charlie