Permalink
Browse files

Merge pull request #26895 from yui-knk/use_same_class_on_transform_va…

…lues

Ensure `#transform_values` of HWIDA to return HWIDA
  • Loading branch information...
guilleiguaran committed Oct 26, 2016
2 parents c0e656f + c51a9b9 commit 634741d9721eb938c8bce38c109023178268e43d
Showing with 5 additions and 0 deletions.
  1. +5 −0 activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -273,6 +273,11 @@ def reject(*args, &block)
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

0 comments on commit 634741d

Please sign in to comment.