Skip to content

Commit

Permalink
Support Ruby 3.1+.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 21, 2023
1 parent a1375fc commit 951ffe3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/debug/thread_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -865,12 +865,15 @@ class SuspendReplay < Exception
private def fiber_blocking
::Fiber.blocking{yield}
end
elsif ::Fiber.method_defined?(:blocking?)
private def fiber_blocking
::Fiber.new(blocking: true){yield}.resume
end
else
private def fiber_blocking
yield
end
end


def wait_next_action
fiber_blocking{wait_next_action_}
Expand Down

0 comments on commit 951ffe3

Please sign in to comment.