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] Enhanced RDoc for String #5675

Merged
merged 4 commits into from Mar 18, 2022
Merged

[DOC] Enhanced RDoc for String #5675

merged 4 commits into from Mar 18, 2022

Conversation

BurdetteLamar
Copy link
Member

@BurdetteLamar BurdetteLamar commented Mar 17, 2022

Treats:

  • #split
  • #each_line
  • #lines
  • #each_byte
  • #bytes

@BurdetteLamar BurdetteLamar added the Documentation Improvements to documentation. label Mar 17, 2022
doc/string.rdoc Outdated Show resolved Hide resolved
# 'こんにちは'.bytes
# # => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]
#
def bytes; end
Copy link
Member

Choose a reason for hiding this comment

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

I should probably have brought this up earlier, but moving the documentation out of the source (string.c) makes the Toggle source feature of RDoc useless. I think we should find a way to keep that feature functional. I see @duerst brought this up many years ago in ruby/rdoc#409. Has there been any progress on that issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

I should probably have brought this up earlier, but moving the documentation out of the source (string.c) makes the Toggle source feature of RDoc useless. I think we should find a way to keep that feature functional. I see @duerst brought this up many years ago in ruby/rdoc#409. Has there been any progress on that issue?

I think it's important to be able to show non-US-ASCII in the examples, especially for classes such as String and Encoding. I'm thinking that many methods's documentation, in String, Encoding, and perhaps others, would profit from examples outside of US-ASCII.

So the issue, as I see it, is whether such examples should wait for an RDoc resolution, or we should go ahead and put them into the C code as we go. Does this need to go to the developers' meeting?

Or, alternatively, we could establish the convention of including the RDoc; if so, we'd need to decide where to put the files. Perhaps in doc/string/, doc/encoding/, etc?

Copy link
Member

Choose a reason for hiding this comment

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

I absolutely agree that we should have non-ASCII examples. We should think of a solution that doesn't break any of the existing features of RDoc. I won't let this issue block you, just something for us to think about in parallel.

Copy link
Member Author

Choose a reason for hiding this comment

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

@peterzhu2118, this is ready, then?

After this merge, I'll make include files for a couple of String methods; then we can get some comments from other committers?

Copy link
Member

Choose a reason for hiding this comment

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

I just put in a few more comments

doc/string.rdoc Outdated Show resolved Hide resolved
doc/string.rdoc Outdated Show resolved Hide resolved
doc/string.rdoc Outdated Show resolved Hide resolved
@BurdetteLamar BurdetteLamar merged commit d52f41b into ruby:master Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements to documentation.
2 participants