mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Be more specific with RUBY_VM_INTERRUPTED
in debug assertions.
This commit is contained in:
parent
3883c38979
commit
dde9fca63b
Notes:
git
2025-06-06 11:29:18 +00:00
1 changed files with 4 additions and 4 deletions
|
@ -648,8 +648,8 @@ rb_fiber_scheduler_unblock(VALUE scheduler, VALUE blocker, VALUE fiber)
|
|||
|
||||
#ifdef RUBY_DEBUG
|
||||
rb_execution_context_t *ec = GET_EC();
|
||||
if (ec->interrupt_flag) {
|
||||
rb_bug("rb_fiber_scheduler_unblock called with interrupt flags set: %d", ec->interrupt_flag);
|
||||
if (RUBY_VM_INTERRUPTED(ec)) {
|
||||
rb_bug("rb_fiber_scheduler_unblock called with pending interrupt");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1078,8 +1078,8 @@ VALUE rb_fiber_scheduler_fiber_interrupt(VALUE scheduler, VALUE fiber, VALUE exc
|
|||
|
||||
#ifdef RUBY_DEBUG
|
||||
rb_execution_context_t *ec = GET_EC();
|
||||
if (ec->interrupt_flag) {
|
||||
rb_bug("rb_fiber_scheduler_fiber_interrupt called with interrupt flags set: %d", ec->interrupt_flag);
|
||||
if (RUBY_VM_INTERRUPTED(ec)) {
|
||||
rb_bug("rb_fiber_scheduler_fiber_interrupt called with pending interrupt");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue