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 authored and matthewd committed Oct 26, 2016
1 parent f0e6774 commit f19e196b562fe8c00efbe1608088035a28c801a3
Showing with 5 additions and 0 deletions.
  1. +5 −0 activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -245,6 +245,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 f19e196

Please sign in to comment.