diff options
author | Matthew Draper <matthew@trebex.net> | 2016-03-12 02:53:33 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-03-12 02:53:33 +1030 |
commit | 120517706e778035ecb9920a8538a00578e79a63 (patch) | |
tree | 93e39cf1642947d8b3f9c4520267b2598829e4c4 /activesupport/lib | |
parent | f8d9c0510742b4f2d440f5223803453aaf0fbab0 (diff) | |
parent | 4f2c25d39d264aca09a000a1c44be0f1937203fa (diff) | |
download | rails-120517706e778035ecb9920a8538a00578e79a63.tar.gz rails-120517706e778035ecb9920a8538a00578e79a63.tar.bz2 rails-120517706e778035ecb9920a8538a00578e79a63.zip |
Merge pull request #24143 from perceptec/fix-thread-mattr-accessor-refs
Fix `thread_mattr_accessor` thread-local variable naming
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb index 8a7e6776da..0b3d18301e 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb @@ -47,7 +47,7 @@ class Module unless options[:instance_reader] == false || options[:instance_accessor] == false class_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{sym} - Thread.current[:"attr_#{self.class.name}_#{sym}"] + Thread.current[:"attr_#{name}_#{sym}"] end EOS end @@ -86,7 +86,7 @@ class Module unless options[:instance_writer] == false || options[:instance_accessor] == false class_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{sym}=(obj) - Thread.current[:"attr_#{self.class.name}_#{sym}"] = obj + Thread.current[:"attr_#{name}_#{sym}"] = obj end EOS end |