aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-09-01 19:04:59 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-09-01 19:04:59 +0900
commitf213e926892020f9ab6c8974612c59e2ba959253 (patch)
treed4cee5a672d6e2110e83b25c29ac40f918d0fbe1 /activesupport
parent8ad8093accc2ab8a8bc727af02127a0b5d1a56f3 (diff)
downloadrails-f213e926892020f9ab6c8974612c59e2ba959253.tar.gz
rails-f213e926892020f9ab6c8974612c59e2ba959253.tar.bz2
rails-f213e926892020f9ab6c8974612c59e2ba959253.zip
Hash#transform_keys is in Ruby 2.5+
since r59328
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/keys.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb
index d291802b40..bdf196ec3d 100644
--- a/activesupport/lib/active_support/core_ext/hash/keys.rb
+++ b/activesupport/lib/active_support/core_ext/hash/keys.rb
@@ -18,7 +18,7 @@ class Hash
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 @@ class Hash
self[yield(key)] = delete(key)
end
self
- end
+ end unless method_defined? :transform_keys!
# Returns a new hash with all keys converted to strings.
#