mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #26895 from yui-knk/use_same_class_on_transform_values
Ensure `#transform_values` of HWIDA to return HWIDA
This commit is contained in:
commit
634741d972
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue