mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Test finalizer is ran in bootstraptest
This commit is contained in:
parent
1232975398
commit
e26ac3ab71
1 changed files with 8 additions and 0 deletions
|
@ -6,3 +6,11 @@ ObjectSpace.define_finalizer(b1,proc{b1.inspect})
|
|||
ObjectSpace.define_finalizer(a2,proc{a1.inspect})
|
||||
ObjectSpace.define_finalizer(a1,proc{})
|
||||
}, '[ruby-dev:35778]'
|
||||
|
||||
assert_equal 'true', %q{
|
||||
obj = Object.new
|
||||
id = obj.object_id
|
||||
|
||||
ObjectSpace.define_finalizer(obj, proc { |i| print(id == i) })
|
||||
nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue