mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
966e15e655
commit
bb053cd824
3 changed files with 11 additions and 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>
|
Thu Oct 25 13:59:53 2007 David Flanagan <davidflanagan@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (parser_tokspace): increment tokidx
|
* parse.y (parser_tokspace): increment tokidx
|
||||||
fixes test failure at [test/ruby/test_stringchar.rb:72]
|
fixes test failure at [test/ruby/test_stringchar.rb:72]
|
||||||
|
|
||||||
|
|
5
io.c
5
io.c
|
@ -318,6 +318,7 @@ flush_before_seek(rb_io_t *fptr)
|
||||||
{
|
{
|
||||||
io_fflush(fptr);
|
io_fflush(fptr);
|
||||||
io_unread(fptr);
|
io_unread(fptr);
|
||||||
|
errno = 0;
|
||||||
return fptr;
|
return fptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,7 +781,7 @@ rb_io_tell(VALUE io)
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
pos = io_tell(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);
|
return OFFT2NUM(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,7 +794,7 @@ rb_io_seek(VALUE io, VALUE offset, int whence)
|
||||||
pos = NUM2OFFT(offset);
|
pos = NUM2OFFT(offset);
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
pos = io_seek(fptr, pos, whence);
|
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);
|
return INT2FIX(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.9.0"
|
#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_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20071024
|
#define RUBY_RELEASE_CODE 20071025
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2007
|
#define RUBY_RELEASE_YEAR 2007
|
||||||
#define RUBY_RELEASE_MONTH 10
|
#define RUBY_RELEASE_MONTH 10
|
||||||
#define RUBY_RELEASE_DAY 24
|
#define RUBY_RELEASE_DAY 25
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
Loading…
Reference in a new issue