Very simple method can be defined:
def merge! other
require 'activesupport/all' # can't use #tap, see #8457
tail = extractoptions!
othertail = other.extractoptions!
concat( other ) << tail.update( other_tail )
When pondering about where this method should dwell, it seemed to me, perhaps in the core itself? Am I deluding myself?
#2 Updated by Boris Stitnicky 10 months ago
Still, many thanks for [:A, :B, C: 1] syntax, I was very happy to discover it!
matz (Yukihiro Matsumoto) wrote:
Generally speaking, arrays are not argument lists. This method is specific to argument lists.
Thus Array is not the right place for the method.