Issue #21653 has been updated by petrenkorf (Petris Fernandes). I just confirmed the behavior described on version 3.5.0dev, but for Hash#select. I'll check other methods to see which of them are not preserving `default` and `default_proc` ---------------------------------------- Feature #21653: Unify Hash methods and preserving default/default_proc https://bugs.ruby-lang.org/issues/21653#change-115110 * Author: andrykonchin (Andrew Konchin) * Status: Open ---------------------------------------- All the Hash methods that return a new instance of Hash don't preserve the `default` and `default_proc` properties except `#compact` and `#merge`: ```ruby h = {a: 1} h.default = 0 h.compact[:f] == 0 # => true h.merge(b: 2)[:f] == 0 # => true ``` Propose to unify Hash methods select/slice/reject/except/compact/merge/transform_values/transform_keys/invert/to_h/Hash[] and to preserve or not preserve default/default_proc altogether. -- https://bugs.ruby-lang.org/