Make Kernel#p
completely uninterruptible.
This commit is contained in:
parent
753d305503
commit
6b0131db6f
Notes:
git
2022-05-28 12:44:44 +09:00
6
io.c
6
io.c
@ -8678,14 +8678,14 @@ rb_p_result(int argc, const VALUE *argv)
|
|||||||
VALUE ret = Qnil;
|
VALUE ret = Qnil;
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
ret = argv[0];
|
ret = argv[0];
|
||||||
}
|
}
|
||||||
else if (argc > 1) {
|
else if (argc > 1) {
|
||||||
ret = rb_ary_new4(argc, argv);
|
ret = rb_ary_new4(argc, argv);
|
||||||
}
|
}
|
||||||
VALUE r_stdout = rb_ractor_stdout();
|
VALUE r_stdout = rb_ractor_stdout();
|
||||||
if (RB_TYPE_P(r_stdout, T_FILE)) {
|
if (RB_TYPE_P(r_stdout, T_FILE)) {
|
||||||
rb_io_flush(r_stdout);
|
rb_uninterruptible(rb_io_flush, r_stdout);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user