From: Pit Capitain Date: 2007-02-09T17:53:17+09:00 Subject: Re: How to "pass" the current binding's block to some other method? Ezra Zygmuntowicz schrieb: > def old_try(x, y, z) > # ... do some other stuff first ... > yield self if block_given? > end > > def try(hash) > old_try(hash[:x], hash[:y], hash[:z], &yield) > end Ezra, this isn't working. In this case: > try( :a => 'foo') { puts 'hi' } yield is calling the block, which returns nil. Calling old_try with &nil is the same as calling it without a block, so block_given? is always false in old_try. Regards, Pit