diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-05-24 16:48:34 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-20 19:35:12 +0900 |
commit | a58611dfb1bfc74fb1a51a9cd0ca8ac690c2f1f4 (patch) | |
tree | c168f6a4b56c0b159a573639fffcead139a28e28 /io.c | |
parent | 15db2e9496703d76b2d785a9e2a1554833706e06 (diff) |
Allow to just warn as bool expected, without an exception
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6039
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3385,7 +3385,7 @@ io_read_nonblock(rb_execution_context_t *ec, VALUE io, VALUE length, VALUE str, } shrinkable = io_setstrbuf(&str, len); - rb_bool_expected(ex, "exception"); + rb_bool_expected(ex, "exception", TRUE); GetOpenFile(io, fptr); rb_io_check_byte_readable(fptr); @@ -3433,7 +3433,7 @@ io_write_nonblock(rb_execution_context_t *ec, VALUE io, VALUE str, VALUE ex) if (!RB_TYPE_P(str, T_STRING)) str = rb_obj_as_string(str); - rb_bool_expected(ex, "exception"); + rb_bool_expected(ex, "exception", TRUE); io = GetWriteIO(io); GetOpenFile(io, fptr); |