diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 05:08:04 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-25 05:08:04 +0000 |
| commit | 27a8e39fe2a2c6cc48077c49d9210bc779381a6b (patch) | |
| tree | 2b43146fb80f12b6bce49a9938e67274f286580d | |
| parent | ef679fad7f9a5e0925f7ecbe9ff4e205f83aaf72 (diff) | |
| download | ruby-27a8e39fe2a2c6cc48077c49d9210bc779381a6b.tar.gz ruby-27a8e39fe2a2c6cc48077c49d9210bc779381a6b.tar.xz ruby-27a8e39fe2a2c6cc48077c49d9210bc779381a6b.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@14660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | test/rinda/test_rinda.rb | 6 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Tue Dec 25 14:03:48 2007 NARUSE, Yui <naruse@ruby-lang.org> + + * 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. + Tue Dec 25 13:54:01 2007 Tanaka Akira <akr@fsij.org> * test/ruby/test_io_m17n.rb (test_pipe): fixed. diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index ba08e26d7..d796546a3 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 |
