We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55d7c84 commit bf532a8Copy full SHA for bf532a8
1 file changed
test/test_timeout.rb
@@ -464,10 +464,12 @@ def test_timeout_in_trap_handler
464
# Stubs Fiber.current_scheduler for the duration of the block, then restores it.
465
def with_mock_scheduler(mock)
466
original = Fiber.method(:current_scheduler)
467
+ Fiber.singleton_class.remove_method(:current_scheduler)
468
Fiber.define_singleton_method(:current_scheduler) { mock }
469
begin
470
yield
471
ensure
472
473
Fiber.define_singleton_method(:current_scheduler, original)
474
end
475
0 commit comments