Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ext/stringio/stringio.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,16 @@ strio_close(VALUE self)
* call-seq:
* close_read -> nil
*
* Closes +self+ for reading; closed-write setting remains unchanged.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the "closed-write setting remains unchanged" information?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the example code:

strio.closed_write? # => false

Could add comment if you like:

strio.closed_write? # => false  # Closed-write unchanged.

And same in #close_write.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an important information.

Could you keep this in the description part not the example part?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored.

* Closes +self+ for reading;
* closed-write setting remains unchanged;
* returns +nil+:
*
* Raises IOError if reading is attempted.
* strio = StringIO.new
* strio.closed_read? # => false
* strio.close_read # => nil
* strio.closed_read? # => true
* strio.closed_write? # => false
* strio.read # Raises IOError: not opened for reading
*
* Related: StringIO#close, StringIO#close_write.
*/
Expand Down