Project

General

Profile

Bug #11593 ยป dead_thread.rb

gazay (Alex Gaziev), 11/19/2015 08:15 AM

 
class Foo
def to_s
puts self
end
end

thr = Thread.new do
Foo.new.to_s
end

puts "0x#{(thr.object_id << 1).to_s(16)}"
thr = nil

require 'objspace'
ObjectSpace.dump_all(output: File.open('dump.json', 'w'))
    (1-1/1)