Skip to content

Conversation

@grosser
Copy link
Contributor

@grosser grosser commented May 9, 2024

merge in ruby hash is defined as returning a copy that is merged whereas merge! is in-place
so having a deep_merge that modifies in-place leads to confusion/bugs
see #56
cc @Fryguy

@grosser
Copy link
Contributor Author

grosser commented May 16, 2024

rebased

def deeper_merge(source, options = {})
default_opts = {:preserve_unmergeables => true}
DeepMerge::deep_merge!(source, self, default_opts.merge(options))
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the idea of this PR. Although, we should probably deprecate this first in a release, then drop it after.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make that PR then, not using this library anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants