class Thread

def thread_variables

for more details.
Note that these are not fiber local variables. Please see Thread#thread_variable_get

thr.thread_variables # => [:dog, :cat]
thr.join # => #
end
Thread.current.thread_variable_set("dog", 'woof')
Thread.current.thread_variable_set(:cat, 'meow')
thr = Thread.new do

Returns an array of the names of the thread-local variables (as Symbols).
def thread_variables
  _locals.keys
end