mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 2 additions and 1 deletions
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…
Add table
Reference in a new issue