Project

General

Profile

Actions

Bug #4480

closed

Thread-local variables issue: Thread#[] returns nil when called first time

Added by dre3k (Andrei Kulakov) almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
-
Backport:
[ruby-core:<unknown>]

Description

=begin
In ruby 1.9.2p180
t = Thread.new do
Thread.current[:var] = "var"
Thread.stop
end

p t[:var] #=> nil
p t[:var] #=> "var"

In ruby 1.8.7
p t[:var] #=> "var"
p t[:var] #=> "var"
=end


Files

thread_rdoc_fix.patch (1.14 KB) thread_rdoc_fix.patch dre3k (Andrei Kulakov), 03/12/2011 08:26 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0