Skip to content

Commit

Permalink
Merge pull request #26895 from yui-knk/use_same_class_on_transform_va…
Browse files Browse the repository at this point in the history
…lues

Ensure `#transform_values` of HWIDA to return HWIDA
  • Loading branch information
guilleiguaran authored and matthewd committed Dec 27, 2016
1 parent f0e6774 commit f19e196
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -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
Expand Down

0 comments on commit f19e196

Please sign in to comment.