diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 02:25:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 02:25:14 +0000 |
commit | 586f727b8c37630d36618f8f09765b92098af8a0 (patch) | |
tree | 5b6fe6393f2e7ef8464f2259243d1b1649f50ea6 /io.c | |
parent | 9a68795300cf21d983c3ce6eafb8529353e37edd (diff) |
* 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
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) { |