ruby-changes:38555
From: nobu <ko1@a...>
Date: Mon, 25 May 2015 11:33:57 +0900 (JST)
Subject: [ruby-changes:38555] nobu:r50636 (trunk): io.c: refine message
nobu 2015-05-25 11:33:36 +0900 (Mon, 25 May 2015) New Revision: 50636 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50636 Log: io.c: refine message * io.c (prepare_getline_args): refine the expected arity in an exception message. Modified files: trunk/io.c Index: io.c =================================================================== --- io.c (revision 50635) +++ io.c (revision 50636) @@ -3112,6 +3112,7 @@ prepare_getline_args(int argc, VALUE *ar https://github.com/ruby/ruby/blob/trunk/io.c#L3112 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 *ar https://github.com/ruby/ruby/blob/trunk/io.c#L3124 } } else if (2 <= argc) { - rb_scan_args(argc, argv, "2", &rs, &lim); + rs = argv[0], lim = argv[1]; if (!NIL_P(rs)) StringValue(rs); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/