Skip to content

Commit

Permalink
Update ext/stringio/stringio.c
Browse files Browse the repository at this point in the history
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
  • Loading branch information
jeremyevans and nobu committed May 30, 2022
1 parent feaa2ec commit 1edc885
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/stringio/stringio.c
Expand Up @@ -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;
Expand Down

0 comments on commit 1edc885

Please sign in to comment.