summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-25 02:33:36 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-25 02:33:36 (GMT)
commit5c0fb216f7817e00bcc04694cb6c455ee583f4a8 (patch)
tree6f7265cc87a6dca2b35d97cfec4543d3160fc6e7 /io.c
parent42d06ac13bb8527965ded04fce75aae4400f24fc (diff)
io.c: refine message
* io.c (prepare_getline_args): refine the expected arity in an exception message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 2fcc25a..e0bbbfa 100644
--- a/io.c
+++ b/io.c
@@ -3112,6 +3112,7 @@ prepare_getline_args(int argc, VALUE *argv, VALUE *rsp, long *limit, VALUE io)
VALUE rs = rb_rs, lim = Qnil;
rb_io_t *fptr;
+ rb_check_arity(argc, 0, 2);
if (argc == 1) {
VALUE tmp = Qnil;
@@ -3123,7 +3124,7 @@ prepare_getline_args(int argc, VALUE *argv, VALUE *rsp, long *limit, VALUE io)
}
}
else if (2 <= argc) {
- rb_scan_args(argc, argv, "2", &rs, &lim);
+ rs = argv[0], lim = argv[1];
if (!NIL_P(rs))
StringValue(rs);
}