Method: IO#tell
- Defined in:
- io.c
#pos ⇒ Integer #tell ⇒ Integer
1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 |
# File 'io.c', line 1590
static VALUE
rb_io_tell(VALUE io)
{
rb_io_t *fptr;
off_t pos;
GetOpenFile(io, fptr);
pos = io_tell(fptr);
if (pos < 0 && errno) rb_sys_fail_path(fptr->pathv);
pos -= fptr->rbuf.len;
return OFFT2NUM(pos);
}
|