mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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 ```
This commit is contained in:
parent
d7d0d01401
commit
7f86ad61cc
2 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue