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
This commit is contained in:
Benoit Daloze 2019-09-26 10:24:17 +02:00
parent cb6db15d22
commit 207974e04e
1 changed files with 1 additions and 1 deletions

View File

@ -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