Omit test on IO Buffers which relies on String being embedded

There is currently a bug ([#19084]) in how extended strings work in
IO Buffers. Object Shapes changes will make the string in this test
extended on 32 bit machines. Since this behavior is currently broken
(unrelated to object shapes) on 32 bit machines, this test will then
fail. We preemptively omit it so that this commit can be reverted
once the bug is fixed.
This commit is contained in:
Jemma Issroff 2022-11-08 15:35:31 -05:00 committed by Peter Zhu
parent 199b59f065
commit 9986697b62
Notes: git 2022-11-10 15:12:05 +00:00

View File

@ -330,6 +330,10 @@ class TestIOBuffer < Test::Unit::TestCase
end
def test_read
# This is currently a bug in IO:Buffer [#19084] which affects extended
# strings. On 32 bit machines, the example below becomes extended, so
# we omit this test until the bug is fixed.
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
io = Tempfile.new
io.write("Hello World")
io.seek(0)
@ -339,7 +343,7 @@ class TestIOBuffer < Test::Unit::TestCase
assert_equal "Hello", buffer.get_string(0, 5)
ensure
io.close!
io.close! if io
end
def test_write