[ruby-core:114011] [Ruby master Bug#18810] Make `Kernel#p` interruptable.

Issue #18810 has been updated by Eregon (Benoit Daloze). `p` being uninterruptible means all of `object.inspect` and potential Fiber scheduler code is run under `Thread.handle_interrupt(Object => :never) { ... }`. That seems a really bad idea, because e.g. if `inspect` would take a long time (creates a huge String or buggy), then it's not possible to interrupt it, e.g. with Ctrl+C. I think this is a CRuby bug, it's too dangerous to disable interrupts for arbitrary code. ---------------------------------------- Bug #18810: Make `Kernel#p` interruptable. https://bugs.ruby-lang.org/issues/18810#change-103672 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: ioquatix (Samuel Williams) * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- While figuring out https://bugs.ruby-lang.org/issues/18465 I found a test which fails when `rb_io_flush` becomes blocking.: https://github.com/ruby/ruby/commit/fe6b2e20e9f17ed2c2900aa72994e075ffdc7124 It seems unusual to me that `Kernel#p` is uninterruptible (unique among all Ruby methods). I'd like to make `Kernel#p` interruptible. -- https://bugs.ruby-lang.org/
participants (1)
-
Eregon (Benoit Daloze)