Permalink
Browse files

Hash#transform_keys is in Ruby 2.5+

since r59328
  • Loading branch information...
amatsuda committed Sep 1, 2017
1 parent 8ad8093 commit f213e926892020f9ab6c8974612c59e2ba959253
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/core_ext/hash/keys.rb
@@ -18,7 +18,7 @@ def transform_keys
result[yield(key)] = self[key]
end
result
end
end unless method_defined? :transform_keys
# Destructively converts all keys using the +block+ operations.
# Same as +transform_keys+ but modifies +self+.
@@ -28,7 +28,7 @@ def transform_keys!
self[yield(key)] = delete(key)
end
self
end
end unless method_defined? :transform_keys!
# Returns a new hash with all keys converted to strings.
#

0 comments on commit f213e92

Please sign in to comment.