Issue #6225 has been updated by trans (Thomas Sawyer).


"No binary operations shall be called + unless the operation is symmetric."

Why?

Also what do you mean by symmetric? Do you mean commutative? I point out that neither Array#+ or String#+ is really commutative either because order is significant.

Also, I don't know why you say "indulgence". It's a simple convenience as a means of writing concise, yet readable, code.


----------------------------------------
Feature #6225: Hash#+
https://bugs.ruby-lang.org/issues/6225#change-25440

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/