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

Fix for scenario when destination is false #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ameir
Copy link

@ameir ameir commented Feb 9, 2021

The previous check would evaluate to false if the value is false. We should instead check if the key exists, and not check truthiness.

The previous check would evaluate to `false` if the value is `false`. We should instead check if the key exists, and not check truthiness.
@Fryguy
Copy link
Collaborator

Fryguy commented Feb 11, 2021

@ameir Can you add a spec for this?

@Fryguy
Copy link
Collaborator

Fryguy commented Feb 11, 2021

See also #23

@ameir
Copy link
Author

ameir commented Feb 12, 2021

@Fryguy thanks for looking this over; I've added a test case to this PR. Please let me know if you need any further adjustments.

@Fryguy Fryguy closed this Jan 7, 2022
@Fryguy Fryguy reopened this Jan 7, 2022
@ameir
Copy link
Author

ameir commented Nov 21, 2022

@Fryguy FWIW, it looks like Chef made a similar update to their fork:
https://github.com/chef/chef/blob/61a11902ab814aad3625eb4da7e3345d63ee7c09/lib/chef/mixin/deep_merge.rb#L82
Commit: chef/chef@bc5acbe

@Fryguy Fryguy closed this May 16, 2024
@Fryguy Fryguy reopened this May 16, 2024
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