Revision
3891
Author
martinlagardette@apple.com
Date
2010-03-29 16:35:51 -0700 (Mon, 29 Mar 2010)

Log Message

IO#tell should not require readability

IO#tell should be usable on write-only and read-only IO, not just read-able IO

Modified Paths

Diff

Modified: MacRuby/trunk/io.c (3890 => 3891)


--- 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