method

tell

v1_8_7_330 - Show latest stable - Class: IO
tell()
public

Returns the current offset (in bytes) of ios.

f = File.new("testfile")
f.pos    #=> 0
f.gets   #=> "This is line one\n"
f.pos    #=> 17