Boolean keys with value "true" in base YAML are not overwritten by "false" in extended YAMLs
MohamedAsan opened this issue ยท 4 comments
For example,
Let the base YAML be:
# base.yml
alpha: true
beta: false
gamma: true
data:
delta: false
kappa: true
theta: false
Let the extended YAML be:
# extended.yml
extends: 'base.yml'
alpha: false
beta: true
data:
delta: true
kappa: false
When you call
YAML.ext_load_file 'extended.yml'
the returned YAML value results in
alpha: true
beta: true
gamma: true
data:
delta: true
kappa: true
theta: false
The values of alpha and kappa should actually be false since they are over-written in extended YAML
Thank you for your very clean reporting.
It seems to be related to the used deep_merge gem, which i use to merge the hashes:
danielsdeleo/deep_merge#23
danielsdeleo/deep_merge#28
I will look for a solution within the next days.
Fixed in version 0.2.2.
https://github.com/entwanderer/yaml_extend/releases/tag/v0.2.2
https://rubygems.org/gems/yaml_extend/versions/0.2.2
Update the gem and have fun! ๐
Thank you so much @entwanderer. It solves an important issue for me! :)
You are welcome! Thank you for contributing! ๐ฅ