Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

false is not overriden by true if preserve_unmergeables #28

Closed
wants to merge 1 commit into from

Conversation

santib
Copy link

@santib santib commented Oct 28, 2016

#23

hash_src = {'something' => true}
hash_dst = {'something' => false}
DeepMerge::deep_merge!(hash_src, hash_dst, {:preserve_unmergeables => true})
assert_equal({'something' => false}, hash_dst)

Choose a reason for hiding this comment

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

Isn't this test incorrect? If you merge {'something' => true} into {'something' => false}, I would expect the result to be {'something' => true}

Choose a reason for hiding this comment

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

Maybe I'm just confused by the expected behavior of this library. Are you suggesting that boolean values should be considered "unmergeable"?

magynhard pushed a commit to magynhard/yaml_extend that referenced this pull request May 27, 2018
The deep_merge gem lacks on a issue, reported here:
danielsdeleo/deep_merge#23
danielsdeleo/deep_merge#28

As yaml_extend uses this gem to merge, here is a workaround to solve
this issue. It will be full forward compatible, if the original deep_merge
solves its issue, due we don't patch deep_merge directly in any way.
@santib santib closed this May 28, 2018
@santib santib deleted the false_preserve branch May 28, 2018 19:14
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.

2 participants