diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-10-01 13:42:58 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-10-01 16:02:03 +1300 |
commit | 13660105e225df0a4fc1f91b8c9618261e5761f3 (patch) | |
tree | 952edb6842ada12121d4c4fc9f64308f916a5f22 /test/fiber/test_scheduler.rb | |
parent | bc23216e5a4204b8e626704c7277e9edc1708189 (diff) |
Don't call `Scheduler#close` if it doesn't exist.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3612
Diffstat (limited to 'test/fiber/test_scheduler.rb')
-rw-r--r-- | test/fiber/test_scheduler.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fiber/test_scheduler.rb b/test/fiber/test_scheduler.rb index 23b59c06b0..d85aa7a6ce 100644 --- a/test/fiber/test_scheduler.rb +++ b/test/fiber/test_scheduler.rb @@ -49,4 +49,12 @@ class TestFiberScheduler < Test::Unit::TestCase end RUBY end + + def test_optional_close + thread = Thread.new do + Thread.current.scheduler = Object.new + end + + thread.join + end end |