diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-12-17 20:22:27 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-12-17 20:22:27 +0100 |
commit | 623c3706b9b2d2ea87f8eb5eafde7b98b8f12728 (patch) | |
tree | 4eceed0fedfc5dbeca1c9f6943087938680de228 /activesupport | |
parent | 9b28b252e28542f416fb913daf847fdf6ae1fd3b (diff) | |
download | rails-623c3706b9b2d2ea87f8eb5eafde7b98b8f12728.tar.gz rails-623c3706b9b2d2ea87f8eb5eafde7b98b8f12728.tar.bz2 rails-623c3706b9b2d2ea87f8eb5eafde7b98b8f12728.zip |
[ci skip] Add `Thread.current` to match internals
We call the thread variable accessors on `Thread.current`, which matches Ruby's
documentation:
http://ruby-doc.org/core-2.2.0/Thread.html#method-i-thread_variable_get
Fix these to stay `current` ( ͡° ͜ʖ ͡°)
Diffstat (limited to 'activesupport')
-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 d2d89ec2d7..e02e965d75 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 @@ -15,7 +15,7 @@ class Module # end # # Current.user # => nil - # Thread.thread_variable_set("attr_Current_user", "DHH") + # Thread.current.thread_variable_set("attr_Current_user", "DHH") # Current.user # => "DHH" # # The attribute name must be a valid method name in Ruby. @@ -63,7 +63,7 @@ class Module # end # # Current.user = "DHH" - # Thread.thread_variable_get("attr_Current_user") # => "DHH" + # Thread.current.thread_variable_get("attr_Current_user") # => "DHH" # # If you want to opt out the instance writer method, pass # <tt>instance_writer: false</tt> or <tt>instance_accessor: false</tt>. |