[DOC] Enhanced RDoc for StringIO#36
[DOC] Enhanced RDoc for StringIO#36BurdetteLamar merged 3 commits intoruby:masterfrom BurdetteLamar:stringio_doc
Conversation
olleolleolle
left a comment
There was a problem hiding this comment.
Thanks for polishing the docs!
(I looked at a minor detail and wrote that.)
| * call-seq: | ||
| * strio.each_codepoint {|c| block } -> strio | ||
| * strio.each_codepoint -> anEnumerator | ||
| * each_codepoint {|codepoint| ... } -> self |
There was a problem hiding this comment.
Minor: Here, the arrow is ->.
There was a problem hiding this comment.
Fixed. (When copying from HTML, I sometimes get burned by this, and by "smart quotes.")
ext/stringio/stringio.c
Outdated
| * strio.gets(sep=$/, chomp: false) -> string or nil | ||
| * strio.gets(limit, chomp: false) -> string or nil | ||
| * strio.gets(sep, limit, chomp: false) -> string or nil | ||
| * gets(sep = $/, **line_opts) → string or nil |
There was a problem hiding this comment.
Minor: Here, and in the rest of the change, the arrow is a ligature.
I don't know which is preferred/correct.
Most welcome! |
ext/stringio/stringio.c
Outdated
| * gets(sep = $/, **line_opts) -> string or nil | ||
| * gets(limit, **line_opts) -> string or nil | ||
| * gets(sep, limit, **line_opts) -> string or nil |
There was a problem hiding this comment.
It looks like the only keyword argument that these method accept is chomp:, so I think it's clearer to explicitly state that rather than having a generic **line_opts.
| * Calls the block with each remaining line read from the stream; | ||
| * does nothing if already at end-of-file; | ||
| * returns +self+. | ||
| * See {Line IO}[https://docs.ruby-lang.org/en/master/io_streams_rdoc.html#label-Line+IO]. |
There was a problem hiding this comment.
I think we should mention that each is an alias of each_line.
(ruby/stringio#36) Treats: - #each_codepoint - #gets - #readline (shows up in doc for module IO::generic_readable, not class StringIO) - #each_line ruby/stringio@659aca7fe5
(ruby/stringio#36) Treats: - #each_codepoint - #gets - #readline (shows up in doc for module IO::generic_readable, not class StringIO) - #each_line ruby/stringio@659aca7fe5
Treats: