diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-20 03:18:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-20 03:18:52 +0000 |
commit | 744e816f55757df92caa49b4787cf06af6120a20 (patch) | |
tree | 924a4754454851c5bdc7c67af7684f3b4ffbd16d /lib | |
parent | d325d74174c3ffffa0d75e248897cbb1aae93407 (diff) | |
download | ruby-744e816f55757df92caa49b4787cf06af6120a20.tar.gz |
Add union method to Array
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.
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
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions