From: Shyouhei Urabe Date: 2011-12-16T00:32:33+09:00 Subject: [ruby-core:41680] [ruby-trunk - Feature #5766][Closed] Hash.each_with_object should behave differently when block's arity is 3 Issue #5766 has been updated by Shyouhei Urabe. Status changed from Open to Closed ---------------------------------------- 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: Closed 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