-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] More about line number #6582
Conversation
doc/io_streams.rdoc
Outdated
The line number is the number of lines read by certain line-oriented methods | ||
(+each_line+, +foreach+, +gets+, +readline+, and +readlines+), | ||
not the number of newlines read; the two numbers: | ||
|
||
- Will be the same if those methods are called only with the default line separator. | ||
- May differ if any is called with a non-default line separator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this is a bit redundant. The line number is the number of linebreaks encountered however you define a newline, which could be \n
, \r\n
, or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recast. B/c we now mention argument +sep+, I've linked to the methods.
doc/io_streams.rdoc
Outdated
A new stream is initially has line number zero, | ||
and method +rewind+ resets the line number to zero. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it sound like all rewind
does is reset the lineno (when in reality, resetting the lineno is more of a side effect of rewind
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recast.
Adds info about when line number changes; also suppresses a few unwanted autolinks in file.c.