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] Enhanced RDoc for IO #5307
Conversation
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.
Looks mostly good. Only a few minor changes requested, please see inline comments.
io.c
Outdated
* system and is not buffered by Ruby internally. See also | ||
* IO#fsync. | ||
* Returns the value of the most recent call to IO#sync=, | ||
* or +false+ if the method has not been called; see IO#sync=: |
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.
The previous language was more accurate. There are cases where the sync mode is set without IO#sync=
(such as on the write pipe returned by IO.pipe
). I would continue to state that this returns the sync mode, even if you only define the sync mode in IO#sync=
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.
Done.
io.c
Outdated
@@ -2630,22 +2650,23 @@ rb_io_descriptor(VALUE io) | |||
|
|||
/* | |||
* call-seq: | |||
* ios.pid -> integer | |||
* pid -> integer |
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.
integer
or nil
Somewhere in the description, we should describe that this returns nil
for instances not created by IO.popen
.
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.
Done. I saw the nil in the previous doc, but could not figure out when it occurs.
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 think the call-seq should still be updated to say integer or nil
.
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.
Please change the call-seq for #pid before committing. After that, OK to commit without further review.
io.c
Outdated
@@ -2630,22 +2650,23 @@ rb_io_descriptor(VALUE io) | |||
|
|||
/* | |||
* call-seq: | |||
* ios.pid -> integer | |||
* pid -> integer |
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 think the call-seq should still be updated to say integer or nil
.
Treated: