ruby-changes:63233
From: Samuel <ko1@a...>
Date: Thu, 1 Oct 2020 12:02:22 +0900 (JST)
Subject: [ruby-changes:63233] 7f29020590 (master): Raise an exception if the scheduler was already closed.
https://git.ruby-lang.org/ruby.git/commit/?id=7f29020590 From 7f2902059031ffe0dad35c9832e4be33d57c5588 Mon Sep 17 00:00:00 2001 From: Samuel Williams <samuel.williams@o...> Date: Thu, 1 Oct 2020 13:43:16 +1300 Subject: Raise an exception if the scheduler was already closed. diff --git a/test/fiber/scheduler.rb b/test/fiber/scheduler.rb index 6e04409..408e0e5 100644 --- a/test/fiber/scheduler.rb +++ b/test/fiber/scheduler.rb @@ -101,6 +101,8 @@ class Scheduler https://github.com/ruby/ruby/blob/trunk/test/fiber/scheduler.rb#L101 end def close + raise "Scheduler already closed!" if @closed + self.run ensure @closed = true -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/