diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2018-02-15 11:39:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 11:39:30 -0800 |
commit | 966843732a607864b077b72b2a17168d4e3548cc (patch) | |
tree | fafa1335652faf869f14074b72b84d806d2f9002 /activesupport/lib | |
parent | 4865f6b58965078e314a22fdcefdf57ee56675b1 (diff) | |
parent | 0b9bf2e2df2f3e17cad25f4f5e5184fbd0191129 (diff) | |
download | rails-966843732a607864b077b72b2a17168d4e3548cc.tar.gz rails-966843732a607864b077b72b2a17168d4e3548cc.tar.bz2 rails-966843732a607864b077b72b2a17168d4e3548cc.zip |
Merge pull request #32003 from SamSaffron/patch-2
PERF: symbolize ivar, to reduce dupes
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/attribute.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 7928efb871..fa33ff945f 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -98,7 +98,7 @@ class Class singleton_class.silence_redefinition_of_method("#{name}?") define_singleton_method("#{name}?") { !!public_send(name) } if instance_predicate - ivar = "@#{name}" + ivar = "@#{name}".to_sym singleton_class.silence_redefinition_of_method("#{name}=") define_singleton_method("#{name}=") do |val| |