Skip to content

Commit

Permalink
* io.c (rb_io_ungetc): don't fail pushed EOF back.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Feb 19, 2002
1 parent c444d60 commit e263207
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
Tue Feb 19 13:16:08 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>

* io.c (rb_io_ungetc): don't fail pushed EOF back.

Mon Feb 18 13:56:44 2002 Yukihiro Matsumoto <matz@ruby-lang.org>

* eval.c (block_pass): "&nil" should clear block given.
Expand Down
2 changes: 1 addition & 1 deletion io.c
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.6"
#define RUBY_RELEASE_DATE "2002-02-18"
#define RUBY_RELEASE_DATE "2002-02-19"
#define RUBY_VERSION_CODE 166
#define RUBY_RELEASE_CODE 20020218
#define RUBY_RELEASE_CODE 20020219

0 comments on commit e263207

Please sign in to comment.