diff options
| author | Yusuke Endoh <mame@ruby-lang.org> | 2020-05-15 01:21:12 +0900 |
|---|---|---|
| committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-05-15 01:21:12 +0900 |
| commit | 7f86ad61cceaffca0d47fe5dc706fbc2ca9ea166 (patch) | |
| tree | 7b5226c4a72a453b0b4f27aaeafeb6780c044e25 | |
| parent | d7d0d01401a8082e514eb2cb3cec5410e7acba7d (diff) | |
test/scheduler: suppress warnings
https://rubyci.s3.amazonaws.com/debian/ruby-master/log/20200514T123004Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20200514T123004Z/ruby/test/scheduler/scheduler.rb:29: warning: assigned but unused variable - fiber
/home/chkbuild/chkbuild/tmp/build/20200514T123004Z/ruby/test/scheduler/scheduler.rb:156: warning: method redefined; discarding old fiber
/home/chkbuild/chkbuild/tmp/build/20200514T123004Z/ruby/test/scheduler/test_fiber.rb:27: warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
| -rw-r--r-- | test/scheduler/scheduler.rb | 4 | ||||
| -rw-r--r-- | test/scheduler/test_fiber.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/test/scheduler/scheduler.rb b/test/scheduler/scheduler.rb index b2d36cc728..820f441dcd 100644 --- a/test/scheduler/scheduler.rb +++ b/test/scheduler/scheduler.rb @@ -18,15 +18,13 @@ class Scheduler @ios = ObjectSpace::WeakMap.new end - attr :fiber - attr :readable attr :writable attr :waiting attr :blocking def next_timeout - fiber, timeout = @waiting.min_by{|key, value| value} + _fiber, timeout = @waiting.min_by{|key, value| value} if timeout offset = timeout - current_time diff --git a/test/scheduler/test_fiber.rb b/test/scheduler/test_fiber.rb index 3452591cd9..368065016e 100644 --- a/test/scheduler/test_fiber.rb +++ b/test/scheduler/test_fiber.rb @@ -24,6 +24,6 @@ class TestSchedulerFiber < Test::Unit::TestCase thread.join assert_not_empty scheduler.blocking - assert_match /test_fiber.rb:\d+:in `close'/, scheduler.blocking.last + assert_match(/test_fiber\.rb:\d+:in `close'/, scheduler.blocking.last) end end |
