Skip to content
  • Hartley McGuire's avatar
    21d1c697
    Fix EncryptedConfiguration not behaving like Hash · 21d1c697
    Hartley McGuire authored
    Previously, `EncryptedConfiguration` was [updated][1] to use
    `InheritableOptions` so that keys could be called like methods. It was
    later [updated again][2] to ensure that it behaved both like a `Hash` and
    `OrderedOptions`. In this second change, the `InheritableOptions`
    instance was accidentally nested with another `InheritableOptions`
    instance.
    
    This continued to mostly work as expected because `InheritableOptions`
    will fall back to the inner `InheritableOptions` when the outer one
    doesn't have a key. However, any methods that try to treat the outer
    `InheritableOptions` like it should know about all of its keys will fail
    (for example, `#keys`, `#to_h`, `#to_json`, etc.)
    
    This commit fixes the issue by removing the extraneous outer
    `InheritableOptions` instance.
    
    [1]: a6a9fed1
    [2]: 80585daf
    21d1c697
    Fix EncryptedConfiguration not behaving like Hash
    Hartley McGuire authored
    Previously, `EncryptedConfiguration` was [updated][1] to use
    `InheritableOptions` so that keys could be called like methods. It was
    later [updated again][2] to ensure that it behaved both like a `Hash` and
    `OrderedOptions`. In this second change, the `InheritableOptions`
    instance was accidentally nested with another `InheritableOptions`
    instance.
    
    This continued to mostly work as expected because `InheritableOptions`
    will fall back to the inner `InheritableOptions` when the outer one
    doesn't have a key. However, any methods that try to treat the outer
    `InheritableOptions` like it should know about all of its keys will fail
    (for example, `#keys`, `#to_h`, `#to_json`, etc.)
    
    This commit fixes the issue by removing the extraneous outer
    `InheritableOptions` instance.
    
    [1]: a6a9fed1
    [2]: 80585daf
Loading