deep_enumerable icon indicating copy to clipboard operation
deep_enumerable copied to clipboard

Add shallow_merge

Open dgopstein opened this issue 9 years ago • 0 comments

That works for Array as well as Hash

[1, 2].shallow_merge({1 => 3, 2 => 4}) == [1, 3, 4] [1, 2].shallow_merge([nil, 3, 4]) == [1, 3, 4] // If we didn't ignore nil, merge would just be assignment

dgopstein avatar May 09 '15 02:05 dgopstein