Skip to content
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] StringIO doc enhancements #33

Merged
merged 4 commits into from
Oct 16, 2022
Merged

[DOC] StringIO doc enhancements #33

merged 4 commits into from
Oct 16, 2022

Conversation

BurdetteLamar
Copy link
Member

Treated:

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

@BurdetteLamar
Copy link
Member Author

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

ext/stringio/stringio.c Outdated Show resolved Hide resolved
ext/stringio/stringio.c Show resolved Hide resolved
ext/stringio/stringio.c Outdated Show resolved Hide resolved
ext/stringio/stringio.c Outdated Show resolved Hide resolved
ext/stringio/stringio.c Outdated Show resolved Hide resolved
ext/stringio/stringio.c Outdated Show resolved Hide resolved
@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
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
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..

@@ -494,9 +530,23 @@ strio_get_string(VALUE self)

/*
* call-seq:
* strio.string = string -> string
* string = string -> string
Copy link
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
Member Author

Choose a reason for hiding this comment

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

Fixed.

*
* 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
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
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).

Copy link
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
Member Author

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

@BurdetteLamar
Copy link
Member Author

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

@BurdetteLamar
Copy link
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
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
Development

Successfully merging this pull request may close these issues.

3 participants