From: Paul Battley Date: 2006-03-14T18:05:58+09:00 Subject: Re: Writing Good #each Methods? I'd also add * If appropriate, inspect the arity of the block and provide the requested number of parameters. Hash#each's behaviour is a good example: hash = {:a=>1, :b=>2} hash.each { |x| p x } # [:b, 2] # [:a, 1] hash.each { |k,v| puts "#{k.inspect} => #{v.inspect}" } # :b => 2 # :a => 1 Paul.