about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-04-11 20:21:59 -0700
committerEric Wong <normalperson@yhbt.net>2010-04-11 20:22:17 -0700
commit957ddbbdc88ff0d644692935f31794a9efb86598 (patch)
tree6fe917369ff465118a2069918e023bb6b9a52025
parentda0d9cbbd9f6cf2e68274dd5c2204b105f8b030d (diff)
downloadraindrops-957ddbbdc88ff0d644692935f31794a9efb86598.tar.gz
-rw-r--r--test/test_linux.rb4
-rw-r--r--test/test_raindrops.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/test_linux.rb b/test/test_linux.rb
index 7744c61..5dc5f5b 100644
--- a/test/test_linux.rb
+++ b/test/test_linux.rb
@@ -138,7 +138,7 @@ class TestLinux < Test::Unit::TestCase
       fork do
         rda.close
         wrb.close
-        socks = nr_sock.times.map { s.accept }
+        socks = (1..nr_sock).times.map { s.accept }
         wra.syswrite('.')
         wra.close
         rdb.sysread(1) # wait for parent to nuke us
@@ -149,7 +149,7 @@ class TestLinux < Test::Unit::TestCase
       fork do
         rda.close
         wrb.close
-        socks = nr_sock.times.map { TCPSocket.new(TEST_ADDR, port) }
+        socks = (1..nr_sock).times.map { TCPSocket.new(TEST_ADDR, port) }
         wra.syswrite('.')
         wra.close
         rdb.sysread(1) # wait for parent to nuke us
diff --git a/test/test_raindrops.rb b/test/test_raindrops.rb
index 66fc208..93885ef 100644
--- a/test/test_raindrops.rb
+++ b/test/test_raindrops.rb
@@ -80,7 +80,7 @@ class TestRaindrops < Test::Unit::TestCase
   end
 
   def test_big
-    expect = 256.times.map { 0 }
+    expect = (1..256).map { 0 }
     rd = Raindrops.new(256)
     assert_equal expect, rd.to_ary
     assert_nothing_raised { rd[255] = 5 }