From: Intransition Date: 2010-08-27T10:42:53+09:00 Subject: Get Proc of current block? Is there any way to get a hold of the current block? I've been playing around with recursive enumerations and it occurs to me that the most flexible technique would simply be to reuse the currently running block. For example, where `this` would be the current block: h = {:a=>1, :b=>{:c=>3}} h.map{ |k,v| Hash===v ? [k.to_s, v.map(&this)] : [k.to_s,v.to_s] } #=> {"a"=>"1", "b"=>{"c"=>"3"}}