From: Yehuda Katz Date: 2009-07-18T14:22:16+09:00 Subject: [ruby-core:24418] [Bug #1717] Thread local variables not visible from within a Fiber Issue #1717 has been updated by Yehuda Katz. You could do: t = Thread.new(Thread.current) do |parent| # access to parent end It seems that having fibers have their own Thread.local is a good thing; otherwise, people who store local things inside of Thread-local variables could have their details suddenly swapped out in certain circumstances. You could even do: class Thread def self.inherit parent = Thread.current new do parent.keys.each do |key| next if key =~ /^__/ Thread.current[key] = parent[key] end yield end end end Which would be used like Thread.new, but automatically copy the parent's thread-locals to the new thread. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1717 ---------------------------------------- http://redmine.ruby-lang.org