summaryrefslogtreecommitdiff
path: root/ext/stringio/stringio.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/stringio/stringio.c')
-rw-r--r--ext/stringio/stringio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 501c7ddddf..26872e0978 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -987,7 +987,7 @@ strio_getline(int argc, VALUE *argv, struct StringIO *ptr)
case 2:
if (!NIL_P(str)) StringValue(str);
- limit = NUM2LONG(lim);
+ if (!NIL_P(lim)) limit = NUM2LONG(lim);
break;
}