From 957ddbbdc88ff0d644692935f31794a9efb86598 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 11 Apr 2010 20:21:59 -0700 Subject: [PATCH] tests: fix to run under MRI 1.8.6 --- test/test_linux.rb | 4 ++-- test/test_raindrops.rb | 2 +- 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 } -- 2.11.4.GIT