Modified: MacRuby/trunk/io.c (3893 => 3894)
--- 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");
}