diff --git a/ChangeLog b/ChangeLog index 0ad962ff64..1c44a5c4ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Feb 19 13:16:08 2002 Nobuyoshi Nakada + + * io.c (rb_io_ungetc): don't fail pushed EOF back. + Mon Feb 18 20:48:40 2002 Nobuyoshi Nakada * pack.c (pack_pack): avoid infinite loop at comment. diff --git a/io.c b/io.c index 9f1550812a..2404b1faf5 100644 --- a/io.c +++ b/io.c @@ -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; } diff --git a/version.h b/version.h index 6734f09a96..85014d14ba 100644 --- a/version.h +++ b/version.h @@ -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