From 623c3706b9b2d2ea87f8eb5eafde7b98b8f12728 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Thu, 17 Dec 2015 20:22:27 +0100 Subject: [ci skip] Add `Thread.current` to match internals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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` ( ͡° ͜ʖ ͡°) --- .../active_support/core_ext/module/attribute_accessors_per_thread.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/module') 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 # instance_writer: false or instance_accessor: false. -- cgit v1.2.3