Skip to content

[DOC] StringIO doc enhancements#33

Merged
BurdetteLamar merged 4 commits intoruby:masterfrom
BurdetteLamar:stringio_doc
Oct 16, 2022
Merged

[DOC] StringIO doc enhancements#33
BurdetteLamar merged 4 commits intoruby:masterfrom
BurdetteLamar:stringio_doc

Conversation

@BurdetteLamar
Copy link
Copy Markdown
Member

Treated:

  • ::new
  • ::open
  • #string
  • #string=
  • #close
  • #close_read
  • #close_write
  • #closed?
  • #closed_read?
  • #closed_write?
  • #eof?

@BurdetteLamar
Copy link
Copy Markdown
Member Author

@nobu, I will merge this only after requesting your approval. Meanwhild, @peterzhu2118 and I can thrash out details?

@kou kou changed the title [DOC] Stringio doc enhancements [DOC] StringIO doc enhancements Oct 11, 2022
* call-seq:
* StringIO.open(string = '', mode = 'r+') {|strio| ... }
*
* Creates a new \StringIO instance formed from +string+ and +mode+;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mode is defaulted to r if string is frozen.
Is this worth to describe?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added to ::new and ::open..

/*
* call-seq:
* strio.string = string -> string
* string = string -> string
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't this confusing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

* see {Position}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Position].
*
* Returns true if the stream is at the end of the data (underlying string).
* The stream must be opened for reading or an +IOError+ will be raised.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't this sentence needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added (three places).

@BurdetteLamar BurdetteLamar requested a review from nobu October 11, 2022 15:15
Copy link
Copy Markdown
Member

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

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

Looks good!

@BurdetteLamar
Copy link
Copy Markdown
Member Author

@nobu, I don't want to merge without your approval.

@BurdetteLamar
Copy link
Copy Markdown
Member Author

@nobu, hoping for your approval. There's more I can do here once this is merged.

@BurdetteLamar
Copy link
Copy Markdown
Member Author

@nobu, you're the maintainer here, right? Any further review?

@BurdetteLamar BurdetteLamar merged commit be9b64d into ruby:master Oct 16, 2022
@BurdetteLamar
Copy link
Copy Markdown
Member Author

@nobu, let me know if you have further comments.

matzbot pushed a commit to ruby/ruby that referenced this pull request Oct 19, 2022
(ruby/stringio#33)

Treated:
- ::new
- ::open
- #string
- #string=
- #close
- #close_read
- #close_write
- #closed?
- #closed_read?
- #closed_write?
- #eof?

ruby/stringio@be9b64d739
tenderlove pushed a commit to Shopify/ruby that referenced this pull request Oct 27, 2022
(ruby/stringio#33)

Treated:
- ::new
- ::open
- #string
- #string=
- #close
- #close_read
- #close_write
- #closed?
- #closed_read?
- #closed_write?
- #eof?

ruby/stringio@be9b64d739
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants