Created
November 14, 2014 04:16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thread' | |
class A | |
def initialize | |
#Thread.new { foo } | |
ObjectSpace.define_finalizer self, proc { puts 'yes' } | |
end | |
def foo | |
sleep | |
end | |
end | |
A.new | |
GC.start | |
sleep 0.1 until false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment