diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-25 05:19:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-25 05:19:33 +0000 |
commit | bb053cd8242aa3794ad24f9a2aab5d9fcd4907b0 (patch) | |
tree | ea31b5eab1be341307045fe22b1e202a8830a126 | |
parent | 966e15e655098152eb9b66d18bd43f7de9061550 (diff) | |
download | ruby-bb053cd8242aa3794ad24f9a2aab5d9fcd4907b0.tar.gz |
* io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 5 | ||||
-rw-r--r-- | version.h | 6 |
3 files changed, 11 insertions, 5 deletions
@@ -1,4 +1,9 @@ +Thu Oct 25 14:19:33 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093] + Thu Oct 25 13:59:53 2007 David Flanagan <davidflanagan@ruby-lang.org> + * parse.y (parser_tokspace): increment tokidx fixes test failure at [test/ruby/test_stringchar.rb:72] @@ -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); } @@ -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[]; |