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


Well, maybe #merge wasn't the best choice for Hash in the first place. Who knows. I only know that polymorphism is so incredibly useful in OOP, that it's a chink in the armor for the language when inconsistencies of this nature remain.

----------------------------------------
Feature #5185: Set#merge acts in place but Hash#merge does not
https://bugs.ruby-lang.org/issues/5185#change-32816

Author: trans (Thomas Sawyer)
Status: Rejected
Priority: Normal
Assignee: knu (Akinori MUSHA)
Category: lib
Target version: 2.0.0


Waste of brain cells to have to learn and recall they are different. The expected method would be Set#merge!, Set#merge would return a new Set instance.

OTOH, why not Set#concat ? Or conversely, Array#merge ?




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