Issue #6225 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas).


In other words you don't like that {a: 1} + {a: 2} != {a: 2} + {a: 1}

But I really think programming is different from mathematics and I don't think that the fact that a + b != b + a would be enough reason for avoiding the convenient operator por  "b merged to a" (a + b).

Not that I really do care that much about this feature request as I don't see any problem on writing a.merge(b) anyway... I just don't see any problems either for having "a + b == a.merge(b)".
----------------------------------------
Feature #6225: Hash#+
https://bugs.ruby-lang.org/issues/6225#change-25439

Author: trans (Thomas Sawyer)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 2.0.0


Strings and Arrays can be combined with #+. I don't see any reason not to allow Hashes to do so as well.

  class Hash
    alias :+ :merge
  end



-- 
http://bugs.ruby-lang.org/