From f213e926892020f9ab6c8974612c59e2ba959253 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 1 Sep 2017 19:04:59 +0900 Subject: Hash#transform_keys is in Ruby 2.5+ since r59328 --- activesupport/lib/active_support/core_ext/hash/keys.rb | 4 ++-- 1 file 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. # -- cgit v1.2.3