summaryrefslogtreecommitdiff
path: root/test/stringio/test_stringio.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-18 04:50:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-18 04:50:14 +0000
commit513345607da396f33b862dc2a48135e8a14bad99 (patch)
tree7fa5fe94a92e064092a79364b222c1af8253723e /test/stringio/test_stringio.rb
parent815e8e992dd3beb427abc0985ff500bf71ca4da3 (diff)
Refine test of r55432
* test/stringio/test_stringio.rb (test_overflow): could occur only on sizeof(long) >= sizeof(void*). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/stringio/test_stringio.rb')
-rw-r--r--test/stringio/test_stringio.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 5dd5de988a..a2778907c8 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -682,7 +682,8 @@ class TestStringIO < Test::Unit::TestCase
end
def test_overflow
- limit = (1 << (RbConfig::SIZEOF["size_t"]*8-1)) - 0x10
+ skip if RbConfig::SIZEOF["void*"] > RbConfig::SIZEOF["long"]
+ limit = (1 << (RbConfig::SIZEOF["void*"]*8-1)) - 0x10
assert_separately(%w[-rstringio], "#{<<-"begin;"}\n#{<<-"end;"}")
begin;
limit = #{limit}