IO#tell should not require readability IO#tell should be usable on write-only and read-only IO, not just read-able IO
--- MacRuby/trunk/io.c 2010-03-29 22:41:07 UTC (rev 3890)
+++ MacRuby/trunk/io.c 2010-03-29 23:35:51 UTC (rev 3891)
@@ -549,9 +549,9 @@
rb_io_tell(VALUE io, SEL sel)
{
rb_io_t *io_struct = ExtractIOStruct(io);
- rb_io_assert_readable(io_struct);
+ rb_io_check_closed(io_struct);
- return OFFT2NUM(ltell(io_struct->read_fd));
+ return OFFT2NUM(ltell(io_struct->fd));
}
static VALUE