From 207974e04e57285c1f1c71394997cbd5dd0cd232 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 26 Sep 2019 10:24:17 +0200 Subject: [PATCH] Use String#+@ before mutating the result of Symbol#to_s * String#+@ is available since Ruby 2.3. * See the upstream Ruby change making Symbol#to_s return a frozen String for efficiency: https://github.com/ruby/ruby/pull/2437 --- activesupport/lib/active_support/ordered_options.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index c4e419f546..ea822706e8 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -39,7 +39,7 @@ module ActiveSupport end def method_missing(name, *args) - name_string = name.to_s + name_string = +name.to_s if name_string.chomp!("=") self[name_string] = args.first else