diff options
author | Samuel Williams <[email protected]> | 2022-05-28 14:42:02 +1200 |
---|---|---|
committer | Samuel Williams <[email protected]> | 2022-05-28 15:44:18 +1200 |
commit | 6b0131db6f029f3e472d00deb2134d45ad4dde3a (patch) | |
tree | bc59f27639fb366f7d1693d7487b55bd72668b89 /io.c | |
parent | 753d30550368e4447b75bb7d1ed3d2703554ee01 (diff) |
Make `Kernel#p` completely uninterruptible.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5419
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -8678,14 +8678,14 @@ rb_p_result(int argc, const VALUE *argv) VALUE ret = Qnil; if (argc == 1) { - ret = argv[0]; + ret = argv[0]; } else if (argc > 1) { - ret = rb_ary_new4(argc, argv); + ret = rb_ary_new4(argc, argv); } VALUE r_stdout = rb_ractor_stdout(); if (RB_TYPE_P(r_stdout, T_FILE)) { - rb_io_flush(r_stdout); + rb_uninterruptible(rb_io_flush, r_stdout); } return ret; } |