ruby-changes:43365
From: nobu <ko1@a...>
Date: Sat, 18 Jun 2016 13:40:20 +0900 (JST)
Subject: [ruby-changes:43365] nobu:r55439 (trunk): Refine test of r55432
nobu 2016-06-18 13:40:15 +0900 (Sat, 18 Jun 2016) New Revision: 55439 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55439 Log: 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. Modified files: trunk/test/stringio/test_stringio.rb Index: test/stringio/test_stringio.rb =================================================================== --- test/stringio/test_stringio.rb (revision 55438) +++ test/stringio/test_stringio.rb (revision 55439) @@ -686,7 +686,13 @@ class TestStringIO < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/stringio/test_stringio.rb#L686 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/