aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_env.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-26 07:36:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-26 07:36:23 +0000
commitf8f36a133c610b9ec6aa1f45ffcfc1e74b5e473f (patch)
tree1d0b11d642f05819a58edb56d7c42f46bc398b1e /test/ruby/test_env.rb
parent38828e61970293b1be6113413cbce96294280953 (diff)
downloadruby-f8f36a133c610b9ec6aa1f45ffcfc1e74b5e473f.tar.gz
test_env.rb: fix one-off bug
* test/ruby/test_env.rb (TestEnv#test_win32_blocksize): count the terminator byte too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_env.rb')
-rw-r--r--test/ruby/test_env.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index d136ba75fa..0ed88dd1d5 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -429,7 +429,7 @@ class TestEnv < Test::Unit::TestCase
if /mswin|mingw/ =~ RUBY_PLATFORM
def test_win32_blocksize
keys = []
- len = 32767 - ENV.to_a.flatten.inject(0) {|r,e| r + e.bytesize + 1}
+ len = 32767 - ENV.to_a.flatten.inject(1) {|r,e| r + e.bytesize + 1}
val = "bar" * 1000
key = nil
while (len -= val.size + (key="foo#{len}").size + 2) > 0