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 | 5b652b44128482f6b6dcaed4bad94f838b43b972 (patch) | |
| tree | 5b6fe6393f2e7ef8464f2259243d1b1649f50ea6 /io.c | |
| parent | e68426afd76f0cc8b4af7ac3c5867a5e3aec353f (diff) | |
| download | ruby-5b652b44128482f6b6dcaed4bad94f838b43b972.tar.gz ruby-5b652b44128482f6b6dcaed4bad94f838b43b972.tar.xz ruby-5b652b44128482f6b6dcaed4bad94f838b43b972.zip | |
* io.c (rb_io_getline_1): get rid of segfault. [ruby-dev:33938]
git-svn-id: http://svn.ruby-lang.org/repos/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)) { |
