f= File.open('path_to_file','w')
f.lineno
#=> 0
f.gets
#=>"this is the content of the first line"
f.lineno
#=>1 # the lineno cooresponse to the next read point of IO#gets
f.rewind
f.lineno
#=>0
f.read
#=>"all the content in the file"
f.lineno
#=>0 # the lineno still is the beginning
f.read
#=>"" # but I can't get anyting , it seems like the read point reach to the end of the file, so the f.lineno should be 3, instead of 0
或者有没有其他方法可以知道IO流的下一个读取点
f.lineno
#=>0