From 88bb5f2749e090ccdddca5f416a8a454e9b936fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 25 Sep 2023 21:04:41 +0000 Subject: [PATCH] Define the method in the right place --- activesupport/test/deep_mergeable_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/test/deep_mergeable_test.rb b/activesupport/test/deep_mergeable_test.rb index ba3f312d094..521ce61e6c4 100644 --- a/activesupport/test/deep_mergeable_test.rb +++ b/activesupport/test/deep_mergeable_test.rb @@ -9,7 +9,7 @@ class DeepMergeableTest < ActiveSupport::TestCase class << self remove_method :[] - def self.[](value) + def [](value) if value.is_a?(Hash) self.new(value.transform_values { |value| self[value] }) else