diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 7ecc5c19bd..d3bb5496bf 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -273,6 +273,11 @@ module ActiveSupport dup.tap { |hash| hash.reject!(*args, &block) } end + def transform_values(*args, &block) + return to_enum(:transform_values) unless block_given? + dup.tap { |hash| hash.transform_values!(*args, &block) } + end + # Convert to a regular hash with string keys. def to_hash _new_hash = Hash.new