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
64
64
end
65
65
66
66
def test_qsort1
67
+ if RUBY_ENGINE == "jruby"
68
+ omit ( "The untouched sanity check is broken on JRuby: https://github.com/jruby/jruby/issues/8365" )
69
+ end
70
+
67
71
closure_class = Class . new ( Closure ) do
68
72
def call ( x , y )
69
73
Pointer . new ( x ) [ 0 ] <=> Pointer . new ( y ) [ 0 ]
@@ -91,14 +95,15 @@ def call(x, y)
91
95
end
92
96
ensure
93
97
# 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 )
100
106
end
101
- assert_equal ( [ ] , not_freed_closures )
102
107
end
103
108
104
109
def test_snprintf
You can’t perform that action at this time.
0 commit comments