diff options
author | Matthew Draper <matthew@trebex.net> | 2018-06-06 09:35:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-06 09:35:02 +0900 |
commit | d0d3e964920602aa710507f6717010d852e37c86 (patch) | |
tree | 61497e74a4dd5f0ea70b4d46b456009026c9da44 /activemodel/lib | |
parent | c4c8e35cac419076a86112d7764f2afdef554483 (diff) | |
parent | a46dcb7454b56c979cded85f2f4f875dcd2cfdf0 (diff) | |
download | rails-d0d3e964920602aa710507f6717010d852e37c86.tar.gz rails-d0d3e964920602aa710507f6717010d852e37c86.tar.bz2 rails-d0d3e964920602aa710507f6717010d852e37c86.zip |
Merge pull request #33051 from SamSaffron/master
PERF: avoid allocating column names where possible
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attributes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/attributes.rb b/activemodel/lib/active_model/attributes.rb index 7d44f7f2a3..5bf213d593 100644 --- a/activemodel/lib/active_model/attributes.rb +++ b/activemodel/lib/active_model/attributes.rb @@ -103,7 +103,7 @@ module ActiveModel def self.set_name_cache(name, value) const_name = "ATTR_#{name}" unless const_defined? const_name - const_set const_name, value.dup.freeze + const_set const_name, -value end end } |