mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_file_truncate): fix function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fcfc113b04
commit
4c7106c679
2 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
|||
Wed Apr 27 00:50:06 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Apr 27 00:51:01 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (rb_file_truncate): fix function.
|
||||
|
||||
* include/ruby/win32.h (ftruncate, truncate, ftello, fseeko): non-64
|
||||
versions on mingw are useless because they use int32_t. fixes #4564
|
||||
|
|
2
file.c
2
file.c
|
@ -3963,7 +3963,7 @@ rb_file_truncate(VALUE obj, VALUE len)
|
|||
rb_sys_fail_path(fptr->pathv);
|
||||
#else /* defined(HAVE_CHSIZE) */
|
||||
if (chsize(fptr->fd, pos) < 0)
|
||||
rb_sys_fail(fptr->pathv);
|
||||
rb_sys_fail_path(fptr->pathv);
|
||||
#endif
|
||||
return INT2FIX(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue