summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKenta Murata <mrkn@users.noreply.github.com>2020-05-22 13:49:08 +0900
committerGitHub <noreply@github.com>2020-05-22 13:49:08 +0900
commitf4f157fc81b940c0f76a01ee266a08e6bba69b6b (patch)
tree357dca6cd03b7cdab65066c6bdfca03d8f5444e7 /ext
parentac395754c7a0d082ab118fe4848886fa14467d39 (diff)
Suppress warnings no inline ruby debug (#3107)
* Suppress unused warnings occurred due to -fno-inline * Suppress warning occurred due to RUBY_DEBUG=1
Notes
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'ext')
-rw-r--r--ext/stringio/stringio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 999e1f5907..b32a391b98 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1532,7 +1532,6 @@ strio_read(int argc, VALUE *argv, VALUE self)
long len;
int binary = 0;
- rb_check_arity(argc, 0, 2);
switch (argc) {
case 2:
str = argv[1];
@@ -1572,6 +1571,8 @@ strio_read(int argc, VALUE *argv, VALUE self)
len -= ptr->pos;
}
break;
+ default:
+ rb_error_arity(argc, 0, 2);
}
if (NIL_P(str)) {
rb_encoding *enc = binary ? rb_ascii8bit_encoding() : get_enc(ptr);