diff --git a/ChangeLog b/ChangeLog index c9c93d93ff..23685cce59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +Thu Oct 25 14:19:33 2007 Nobuyoshi Nakada + + * io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093] + Thu Oct 25 13:59:53 2007 David Flanagan + * parse.y (parser_tokspace): increment tokidx fixes test failure at [test/ruby/test_stringchar.rb:72] diff --git a/io.c b/io.c index 13e70860f0..ded34f07de 100644 --- a/io.c +++ b/io.c @@ -318,6 +318,7 @@ flush_before_seek(rb_io_t *fptr) { io_fflush(fptr); io_unread(fptr); + errno = 0; return fptr; } @@ -780,7 +781,7 @@ rb_io_tell(VALUE io) GetOpenFile(io, fptr); pos = io_tell(fptr); - if (pos < 0) rb_sys_fail(fptr->path); + if (pos < 0 && errno) rb_sys_fail(fptr->path); return OFFT2NUM(pos); } @@ -793,7 +794,7 @@ rb_io_seek(VALUE io, VALUE offset, int whence) pos = NUM2OFFT(offset); GetOpenFile(io, fptr); pos = io_seek(fptr, pos, whence); - if (pos < 0) rb_sys_fail(fptr->path); + if (pos < 0 && errno) rb_sys_fail(fptr->path); return INT2FIX(0); } diff --git a/version.h b/version.h index c693516162..3038a9921b 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-10-24" +#define RUBY_RELEASE_DATE "2007-10-25" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20071024 +#define RUBY_RELEASE_CODE 20071025 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 10 -#define RUBY_RELEASE_DAY 24 +#define RUBY_RELEASE_DAY 25 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];