Skip to content

Add shallow_merge #3

@dgopstein

Description

@dgopstein

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions