mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Refine test of r55432
* test/stringio/test_stringio.rb (test_overflow): refine the conditinon, try to allocate strings until the buffer is located in higher half address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c79c06fa1c
commit
815e8e992d
1 changed files with 7 additions and 1 deletions
|
@ -686,7 +686,13 @@ class TestStringIO < Test::Unit::TestCase
|
|||
assert_separately(%w[-rstringio], "#{<<-"begin;"}\n#{<<-"end;"}")
|
||||
begin;
|
||||
limit = #{limit}
|
||||
x = ("a"*0x100000)
|
||||
ary = []
|
||||
while true
|
||||
x = "a"*0x100000
|
||||
break if [x].pack("p").unpack("i!")[0] < 0
|
||||
ary << x
|
||||
skip if ary.size > 1000
|
||||
end
|
||||
s = StringIO.new(x)
|
||||
s.gets("xxx", limit)
|
||||
assert_equal(0x100000, s.pos)
|
||||
|
|
Loading…
Add table
Reference in a new issue