File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ def test_strtod
6464 end
6565
6666 def test_qsort1
67+ if RUBY_ENGINE == "jruby"
68+ omit ( "The untouched sanity check is broken on JRuby" )
69+ end
70+
6771 closure_class = Class . new ( Closure ) do
6872 def call ( x , y )
6973 Pointer . new ( x ) [ 0 ] <=> Pointer . new ( y ) [ 0 ]
@@ -91,14 +95,15 @@ def call(x, y)
9195 end
9296 ensure
9397 # We can't use ObjectSpace with JRuby.
94- return if RUBY_ENGINE == "jruby"
95- # Ensure freeing all closures.
96- # See https://github.com/ruby/fiddle/issues/102#issuecomment-1241763091 .
97- not_freed_closures = [ ]
98- ObjectSpace . each_object ( Fiddle ::Closure ) do |closure |
99- not_freed_closures << closure unless closure . freed?
98+ unless RUBY_ENGINE == "jruby"
99+ # Ensure freeing all closures.
100+ # See https://github.com/ruby/fiddle/issues/102#issuecomment-1241763091 .
101+ not_freed_closures = [ ]
102+ ObjectSpace . each_object ( Fiddle ::Closure ) do |closure |
103+ not_freed_closures << closure unless closure . freed?
104+ end
105+ assert_equal ( [ ] , not_freed_closures )
100106 end
101- assert_equal ( [ ] , not_freed_closures )
102107 end
103108
104109 def test_snprintf
You can’t perform that action at this time.
0 commit comments