summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-05-24 16:48:34 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-06-20 19:35:12 +0900
commita58611dfb1bfc74fb1a51a9cd0ca8ac690c2f1f4 (patch)
treec168f6a4b56c0b159a573639fffcead139a28e28 /io.c
parent15db2e9496703d76b2d785a9e2a1554833706e06 (diff)
downloadruby-a58611dfb1bfc74fb1a51a9cd0ca8ac690c2f1f4.tar.gz
Allow to just warn as bool expected, without an exception
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index fc1a5d8110..a8326fcbcf 100644
--- a/io.c
+++ b/io.c
@@ -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);