Skip to content

Commit 8041bfd

Browse files
committed
Ruby testcase fix
Reportedly failing. Failure can be replicated with 2.5.1 by increasing number of loops. Workaround is to disable GC. Closes swig#1646
1 parent db3774a commit 8041bfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Examples/test-suite/ruby/newobject2_runme.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
include Newobject2
1919

2020
GC.track_class = Foo
21+
GC.disable
2122
GC.stats if $VERBOSE
2223
100.times { foo1 = makeFoo }
2324
GC.stats if $VERBOSE
2425
swig_assert( 'fooCount == 100', nil, "but is #{fooCount}" )
26+
GC.enable
2527
GC.start
2628
swig_assert( 'fooCount <= 1', nil, "but is #{fooCount}" )
2729

0 commit comments

Comments
 (0)