summaryrefslogtreecommitdiff
path: root/test/rinda/test_rinda.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 05:08:04 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-25 05:08:04 +0000
commit34c6bca38177e32f24c97e85494162b6d782401a (patch)
tree2b43146fb80f12b6bce49a9938e67274f286580d /test/rinda/test_rinda.rb
parentba852066351c147cf1010607b1f8195dda825b08 (diff)
* test/rinda/test_rinda.rb (MockClock#{_forward, forwrd, sleep}):
Change default value of n as @reso from nil. If default value is nil, n.+ is not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rinda/test_rinda.rb')
-rw-r--r--test/rinda/test_rinda.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index ba08e26d78..d796546a3d 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -33,14 +33,14 @@ class MockClock
n
end
- def _forward(n=nil)
+ def _forward(n=@reso)
now ,= @ts.take([nil, :now])
@now = now + n
n = @reso if n.nil?
@ts.write([@now, :now])
end
- def forward(n=nil)
+ def forward(n=@reso)
while n > 0
_forward(@reso)
n -= @reso
@@ -55,7 +55,7 @@ class MockClock
@ts.write([2, :now])
end
- def sleep(n=nil)
+ def sleep(n=@reso)
while will_deadlock?
n -= @reso
forward