From: ara.t.howard@... Date: 2006-08-16T01:12:52+09:00 Subject: Re: Hash#each On Wed, 16 Aug 2006, Trans wrote: > > ara.t.howard@noaa.gov wrote: > >> both will cause all sorts of issues. this fails: > > I'm not following how it fails? I may be missing something but it seems > to do what I'd expect: > > irb(main):002:0> h.each { |*v| p v } > [[:b, 2]] > [[:a, 1]] > => {:b=>2, :a=>1} h.each{|a| p a.first.size} > irb(main):003:0> require 'facet/hash/each' > => true > irb(main):004:0> h.each { |*v| p v } > [:b, 2] > [:a, 1] > => {:b=>2, :a=>1} h.each{|a| p a.first.size} #=> NoMethodError just pointing out it's not ok to drop in replace with this impl. cheers. -a -- to foster inner awareness, introspection, and reasoning is more efficient than meditation and prayer. - h.h. the 14th dali lama