I introduce a union method equivalent to the | operator, but which
accept more than array as argument. This improved readability, and it
is also coherent with the + operator, which has a similar concat
method. The method doesn't modify the original object and return a new
object instead. It is plan to introduce a union! method as well.
Add union method to Array
I introduce a
union
method equivalent to the|
operator, but whichaccept more than array as argument. This improved readability, and it
is also coherent with the
+
operator, which has a similarconcat
method. The method doesn't modify the original object and return a new
object instead. It is plan to introduce a
union!
method as well.Tests and documentation are included.
It solves partially https://bugs.ruby-lang.org/issues/14097
[Fix GH-1747] [Feature #14097]
From: Ana María Martínez Gómez ammartinez@suse.de
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e