summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2024-11-05 19:18:03 +0900
committerYusuke Endoh <[email protected]>2024-11-05 19:48:00 +0900
commit6c5a808b865906bc6baa2593e4f0b438af3f01cf (patch)
tree6140bc72e541d262fb5e9d7b133b2f7c3342b3af
parentcb1c79e87b0711230a333ee629aba24e06f530d0 (diff)
Use rb_fiber_scheduler_get() instead of rb_fiber_scheduler_current()
rb_fiber_scheduler_current() may return nil depending on whether the scheduler is being prevented for some reason, e.g., Fiber.blocking{}. Co-Authored-By: Samuel Williams <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12001
-rw-r--r--vm_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 91f99d233b..193b48b5a4 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -1141,7 +1141,7 @@ rb_vm_bugreport(const void *ctx, FILE *errout)
"---------------------------------------------------\n");
kprintf("Total ractor count: %u\n", vm->ractor.cnt);
kprintf("Ruby thread count for this ractor: %u\n", rb_ec_ractor_ptr(ec)->threads.cnt);
- if (rb_fiber_scheduler_current() != Qnil) {
+ if (rb_fiber_scheduler_get() != Qnil) {
kprintf("Note that the Fiber scheduler is enabled\n");
}
kputs("\n");