Skip to content

Commit 7a2d178

Browse files
committed
Skip List#index test on JRuby which is broken by JRuby bug
I have sent a potential fix to JRuby: jruby/jruby#3325 If the bug is fixed in JRuby, we can later remove this.
1 parent a5fd545 commit 7a2d178

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

spec/lib/immutable/list/index_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
].each do |values, item, expected|
2626
context "looking for #{item.inspect} in #{values.inspect}" do
2727
it "returns #{expected.inspect}" do
28-
L[*values].index(item).should == expected
28+
if RUBY_ENGINE == 'jruby' && RUBY_VERSION <= '2.2.2' && values[0].is_a?(Fixnum) && item.is_a?(Float)
29+
skip "On JRuby, Enumerable#find_index doesn't test equality properly"
30+
else
31+
L[*values].index(item).should == expected
32+
end
2933
end
3034
end
3135
end

0 commit comments

Comments
 (0)