Skip to content

Commit

Permalink
Spec for IO#seek > 2^32.
Browse files Browse the repository at this point in the history
See #3817.
  • Loading branch information
headius committed Sep 29, 2016
1 parent cc79119 commit 2356837
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/ruby/core/io/seek_spec.rb
Expand Up @@ -61,4 +61,19 @@
@io.eof?.should == false
value[-1].should == @io.read[0]
end

platform_is_not :windows do
it "supports seek offsets greater than 2^32" do
begin
zero = File.open('/dev/zero')
offset = 2**33
zero.seek(offset, File::SEEK_SET)
pos = zero.pos

pos.should == offset
ensure
zero.close rescue nil
end
end
end
end

0 comments on commit 2356837

Please sign in to comment.