Skip to content

Commit 1fca74f

Browse files
author
Nicolas Laurent
committed
[GR-19779] Force GC to fix 'ObjectSpace.define_finalizer' transient.
PullRequest: truffleruby/1747
2 parents d53fc01 + eb61ec4 commit 1fca74f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/truffle/objspace/define_finalizer_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# truffleruby_primitives: true
2+
#
13
# Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved. This
24
# code is released under a tri EPL/GPL/LGPL license. You can use it,
35
# redistribute it and/or modify it under the terms of the:
@@ -30,7 +32,7 @@
3032
ObjectSpace.define_finalizer object, finalizer
3133
ObjectSpace.reachable_objects_from(object).should include(finalizer)
3234
end
33-
GC.start
35+
Primitive.gc_force
3436
Truffle::Debug.drain_finalization_queue # Not needed for correctness
3537
channel.receive_timeout(TIME_TOLERANCE).should == :finalized
3638
end

0 commit comments

Comments
 (0)