Skip to content

Commit 5e579e2

Browse files
committed
Disable a String#[] spec with big negative length on Windows
1 parent 5e813ca commit 5e579e2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

core/string/shared/slice.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@
122122
platform_is pointer_size: 64 do
123123
it "returns nil if the length is negative big value" do
124124
"hello there".send(@method, 4, -(1 << 31)).should == nil
125-
"hello there".send(@method, 4, -(1 << 63)).should == nil
125+
126+
# by some reason length < -(1 << 31) on CI on Windows leads to
127+
# 'RangeError: bignum too big to convert into `long'' error
128+
platform_is_not :windows do
129+
"hello there".send(@method, 4, -(1 << 63)).should == nil
130+
end
126131
end
127132
end
128133

0 commit comments

Comments
 (0)