1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (rb_io_getline_1): get rid of segfault. [ruby-dev:33938]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-02-28 02:25:14 +00:00
parent 9a68795300
commit 586f727b8c

2
io.c
View file

@ -1960,7 +1960,7 @@ rb_io_getline_1(VALUE rs, long limit, VALUE io)
swallow(fptr, '\n');
}
}
str = io_enc_str(str, fptr);
if (!NIL_P(str)) str = io_enc_str(str, fptr);
}
if (!NIL_P(str)) {