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 | 7a1b9234b1b14f314dab37c5d1a5796069663979 (patch) | |
tree | 1c4a93d44ef474f7b972682b45ad719f1517e999 /io.c | |
parent | dfb8c0b5668b080d8410a587c093d81b69e828d3 (diff) | |
download | ruby-7a1b9234b1b14f314dab37c5d1a5796069663979.tar.gz ruby-7a1b9234b1b14f314dab37c5d1a5796069663979.tar.xz ruby-7a1b9234b1b14f314dab37c5d1a5796069663979.zip |
* io.c (rb_io_ungetc): don't fail pushed EOF back.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1083,7 +1083,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; } |