Closed ashmaroli closed 5 years ago
Hello there! Any plan on merging this? Would be useful to some of us 👍
I can confirm this PR works and fixes #121 for me
Ping @pixelastic
@redox You're welcome. Out of curiosity, what exactly did you mean by LBTM?
When I first saw it, my brain registered it as a typo, but then expanded it to Looks Bad To Me (opposite of LGTM: Looks Good To Me). Gosh! :smile: Google search returned Laughing Behind The Monitor among other expansions irrelevant to the current context...
Out of curiosity, what exactly did you mean by LBTM?
Ouch sorry, typo :) LGTM
Closes #121
Semantically, deleting a key from a hash is the same as resetting it to
nil
asconfig[key]
returns the same value in both cases. However, there's a chance that the config hash is traversed usingHash#fetch
which returns a given default value or calls a given block only if the saidkey
doesn't exist in the hash. This results in differing behavior.Hence, deleting a config key is better than resetting it to
nil
.An added benefit is that deleting a key frees allocated memory.