diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-19 04:19:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-19 04:19:06 +0000 |
commit | e2632074f272b236a2b4a71b74f9be01a584245f (patch) | |
tree | 6cf3cdaaef0fab0e05141652cddf2fd637f6b694 /io.c | |
parent | c444d6012fea7a7a81235735bc60f88c508a4238 (diff) |
* io.c (rb_io_ungetc): don't fail pushed EOF back.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -989,7 +989,7 @@ rb_io_ungetc(io, c) GetOpenFile(io, fptr); rb_io_check_readable(fptr); - if (ungetc(cc, fptr->f) == EOF) + if (ungetc(cc, fptr->f) == EOF && cc != EOF) rb_sys_fail(fptr->path); return Qnil; } |