[macruby-changes] [3894] MacRuby/trunk/io.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 29 18:05:57 PDT 2010
Revision: 3894
http://trac.macosforge.org/projects/ruby/changeset/3894
Author: martinlagardette at apple.com
Date: 2010-03-29 18:05:57 -0700 (Mon, 29 Mar 2010)
Log Message:
-----------
rb_io_seek should not require readability
rb_io_seek should be usable on write-only and read-only IO, not just read-able IO
Modified Paths:
--------------
MacRuby/trunk/io.c
Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c 2010-03-30 00:21:36 UTC (rev 3893)
+++ MacRuby/trunk/io.c 2010-03-30 01:05:57 UTC (rev 3894)
@@ -558,12 +558,12 @@
rb_io_seek(VALUE io, VALUE offset, int whence)
{
rb_io_t *io_struct = ExtractIOStruct(io);
- rb_io_assert_readable(io_struct);
+ rb_io_check_closed(io_struct);
off_t off = NUM2OFFT(offset);
// if (whence == SEEK_CUR) {
// off += ltell(io_struct->read_fd);
// }
- const off_t code = lseek(io_struct->read_fd, off, whence);
+ const off_t code = lseek(io_struct->fd, off, whence);
if (code == -1) {
rb_sys_fail("lseek() failed");
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100329/a1523a13/attachment.html>
More information about the macruby-changes
mailing list