From: Daniel Schierbeck Date: 2006-08-15T22:45:05+09:00 Subject: [Facet] Hash#each The current implementation of Hash#each[1]: # File lib/facets/core/hash/each.rb, line 19 def each(&yld) case yld.arity when 0 when 1 each_value{|v| yield(v)} else each_pair{|k,v| yld.call(k,v)} end self end To me it looks like we're creating more Proc objects than necessary. Would this not suffice? def each(&block) if block.arity < 2 each_value(&block) else each_pair(&block) end end Cheers, Daniel [1]