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
This commit is contained in:
parent
42d06ac13b
commit
5c0fb216f7
3
io.c
3
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user