Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Hash#transform_keys!

hash.transform_keys! {|key| ... } → self
hash.transform_keys!(hash2) → self
hash.transform_keys!(hash2) {|other_key| ...} → self
hash.transform_keys! → new_enumerator

Same as Hash#transform_keys but modifies the receiver in place instead of returning a new hash.

Ruby version changes

  1. 3.0