Skip to content

Commit 6b3b96d

Browse files
eregonAndrii Konchyn
authored andcommitted
Remove invalid IO::Buffer#valid? spec
* realloc() may return the same pointer, so this is very brittle. * Other Ruby implementations might be able to keep this valid even if a new String is allocated (e.g. TruffleRuby).
1 parent ff49207 commit 6b3b96d

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

core/io/buffer/valid_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,6 @@
5757
@buffer.resize(3)
5858
slice.valid?.should == false
5959
end
60-
61-
platform_is_not :linux do
62-
# This test does not cause a copy-resize on Linux.
63-
# `#resize` MAY cause the buffer to move, but there is no guarantee.
64-
it "is false when buffer is copied on resize" do
65-
@buffer = IO::Buffer.new(4, IO::Buffer::MAPPED)
66-
slice = @buffer.slice(0, 2)
67-
@buffer.resize(8)
68-
slice.valid?.should == false
69-
end
70-
end
7160
end
7261

7362
it "is false for a slice of a transferred buffer" do

0 commit comments

Comments
 (0)