Skip to content

Commit 0b32043

Browse files
ioquatixko1
authored andcommitted
Support Ruby 3.1+.
1 parent bfe9568 commit 0b32043

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/debug/thread_client.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,15 @@ class SuspendReplay < Exception
865865
private def fiber_blocking
866866
::Fiber.blocking{yield}
867867
end
868+
elsif ::Fiber.method_defined?(:blocking?)
869+
private def fiber_blocking
870+
::Fiber.new(blocking: true){yield}.resume
871+
end
868872
else
869873
private def fiber_blocking
870874
yield
871875
end
872876
end
873-
874877

875878
def wait_next_action
876879
fiber_blocking{wait_next_action_}

0 commit comments

Comments
 (0)