Skip to content

Conversation

@BurdetteLamar
Copy link
Member

No description provided.

@kou kou changed the title [DOC] Tweaks for StringIO.getc [DOC] Tweaks for StringIO#getc Dec 6, 2025
strio.getc # => "\x93"

Related: StringIO.getbyte.
Related: #each_char, #putc, #ungetc.
Copy link
Member

Choose a reason for hiding this comment

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

Why is getbyte removed from related methods?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why is getbyte removed from related methods?

The Ruby doc guide suggests no more than three relateds (though of course that doc does not govern here). I thought the three other char methods more important than the byte method.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I didn't know the guide.

I think that #getbyte (similar), #ungetc (opposite) and #putc (opposite) are most related 3 methods because they focus on one operation like #getc does. #each_char (iterator variant) is less related than them because it focus on multiple targets.

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.

@BurdetteLamar BurdetteLamar requested a review from kou December 6, 2025 23:53
@kou kou merged commit e3d16d3 into ruby:master Dec 7, 2025
53 checks passed
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.

2 participants