You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A [previous change][1] fixed `HWIA#transform_keys!` from clobbering keys
if they ended up transforming into another pre-transformed key. However,
that change also resulted in `HWIA#transform_keys!` clearing the
`default`/`default_proc`.
This commit fixes that issue and adds test coverage to both
`#transform_keys` and `#transform_keys!` to ensure that their behavior
with regard to `default`/`default_proc` is consistent with `Hash`.
```irb
irb(main):001> Hash.new(:a).transform_keys(&:to_s).default
=> nil
irb(main):002> Hash.new(:a).transform_keys!(&:to_s).default
=> :a
```
[1]: f49d7a0
0 commit comments