From: Rodrigo Rosenfeld Rosas Date: 2011-12-15T13:07:22+09:00 Subject: [ruby-core:41668] [ruby-trunk - Feature #5766][Open] Hash.each_with_object should behave differently when block's arity is 3 Issue #5766 has been reported by Rodrigo Rosenfeld Rosas. ---------------------------------------- Feature #5766: Hash.each_with_object should behave differently when block's arity is 3 http://redmine.ruby-lang.org/issues/5766 Author: Rodrigo Rosenfeld Rosas Status: Open Priority: Normal Assignee: Category: Target version: Enum.each_with_object is very handy in lots of situations, but specially while dealing with arrays. It would be great to be able to use it with hashes like below: {a: 1}.each_with_object([]){|k, v, object| ...} Currently, we need to do {a: 1}.each_with_object([]) do |pair, object| k, v = pair ... end -- http://redmine.ruby-lang.org