9 Commits
Author SHA1 Message Date
Peter Zhu 09847a62a3 [DOC] Fix String#split docs
When `limit` is negative, the trailing empty strings are included.
2026-06-16 10:09:24 +09:00
BurdetteLamar f8eed58469 [DOC] Fix links in String 2026-02-06 18:35:02 -05:00
BurdetteLamar a92c0342dd [DOC] Japanese only for multi-byte chars examples 2025-12-27 10:59:48 -05:00
BurdetteLamar d4ea1686b5 [DOC] Tweaks for String#split 2025-10-22 18:13:58 -04:00
Damian C. Rossney 6029781984 [DOC] Update for String#split
Highlight the performance advantages of calling `string.split` with a block, instead of `string.split.each` with the same block.

Includes other minor formatting corrections.
2025-04-23 13:05:30 +09:00
Kouhei Yanagita eb2b0c2a0d [DOC] Fix the default limit of String#split
We can't pass `nil` as the second parameter of `String#split`.
Therefore, descriptions like "if limit is nil, ..." are not appropriate.
2024-11-19 12:15:48 +09:00
ydah aa6d0bc0bd s/ocurs/occurs/ 2024-02-15 17:01:02 +09:00
Burdette Lamar 5525e47a0b [DOC] Enhanced RDoc for String (#5726)
Treats:

    #ljust
    #rjust
    #center
    #partition
    #rpartition
2022-03-28 15:49:18 -05:00
Burdette Lamar c129b6119d [DOC] Use RDoc inclusions in string.c (#5683)
As @peterzhu2118 and @duerst have pointed out, putting string method's RDoc into doc/ (which allows non-ASCII in examples) makes the "click to toggle source" feature not work for that method.

This PR moves the primary method doc back into string.c, then includes RDoc from doc/string/*.rdoc, and also removes doc/string.rdoc.

The affected methods are:

    ::new
    #bytes
    #each_byte
    #each_line
    #split

The call-seq is in string.c because it works there; it did not work when the call-seq is in doc/string/*.rdoc.

This PR also updates the relevant guidance in doc/documentation_guide.rdoc.
2022-03-21 14:58:00 -05:00