1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-02-19 04:19:06 +00:00
parent e58ec21435
commit 0cbfe8c524
3 changed files with 7 additions and 3 deletions

View file

@ -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 20:48:40 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* pack.c (pack_pack): avoid infinite loop at comment.

2
io.c
View file

@ -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;
}

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.2"
#define RUBY_RELEASE_DATE "2002-02-18"
#define RUBY_RELEASE_DATE "2002-02-19"
#define RUBY_VERSION_CODE 172
#define RUBY_RELEASE_CODE 20020218
#define RUBY_RELEASE_CODE 20020219