[ruby-core:114012] [Ruby master Bug#18810] Make `Kernel#p` interruptable.
From:
"Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>
Date:
2023-06-23 10:26:22 UTC
List:
ruby-core #114012
Issue #18810 has been updated by Eregon (Benoit Daloze).
Mmh, but it does work to interrupt `p`:
```
$ ruby -e 'o=Object.new; def o.inspect; loop { Thread.pass }; end; p 1; p o'
1
^C-e:1:in `pass': Interrupt
from -e:1:in `block in inspect'
from -e:1:in `loop'
from -e:1:in `inspect'
from -e:1:in `p'
from -e:1:in `<main>'
```
What am I missing then?
----------------------------------------
Bug #18810: Make `Kernel#p` interruptable.
https://bugs.ruby-lang.org/issues/18810#change-103673
* 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/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/