зеркало из https://github.com/github/ruby.git
[ruby/stringio] Update ext/stringio/stringio.c
https://github.com/ruby/stringio/commit/1edc88587e Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
Родитель
adaaf12857
Коммит
7e3920f0d9
|
@ -1125,9 +1125,10 @@ prepare_getline_args(struct getline_arg *arg, int argc, VALUE *argv)
|
|||
{
|
||||
VALUE str, lim, opts;
|
||||
long limit = -1;
|
||||
int respect_chomp;
|
||||
|
||||
argc = rb_scan_args(argc, argv, "02:", &str, &lim, &opts);
|
||||
int respect_chomp = argc == 0 || !NIL_P(str);
|
||||
respect_chomp = argc == 0 || !NIL_P(str);
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_rs;
|
||||
|
|
Загрузка…
Ссылка в новой задаче