summaryrefslogtreecommitdiff
path: root/string.c
Commit message (Collapse)AuthorAgeFilesLines
* Using is_ascii_string to check encodingS-H-GAMELINKS2022-06-171-3/+3
|
* Remove unused and accidentally public rb_str_shared_root_p()Alan Wu2022-06-161-6/+0
| | | | | | | This function was added to a public header in [1] probably unintentionally since it's not used anywhere, exposes implementation details, and isn't related to the goals of that pull request. [1]: 56cc3e99b6b9ec004255280337f6b8353f5e5b06
* Add placeholder to let braces matchNobuyoshi Nakada2022-06-141-6/+6
|
* Move String RVALUES between poolsMatt Valentine-House2022-06-131-4/+73
| | | | | And re-embed any strings that can now fit inside the slot they've been moved to
* [DOC] Fix markup for `String` (#5984)Alexander Ilyin2022-06-091-1/+1
| | | | | | * Add missing space for `String#start_with?`. * Add missing pluses for `String#tr` and `Methods for Converting to New String` label. * Move quote into the tag for `Whitespace in Strings` label.
* Revert "error.c: Let Exception#inspect inspect its message"Yusuke Endoh2022-06-071-1/+1
| | | | This reverts commit 9d927204e7b86eb00bfd07a060a6383139edf741.
* error.c: Let Exception#inspect inspect its messageYusuke Endoh2022-06-071-1/+1
| | | | | | | | | | | | ... only when the message string has a newline. `p StandardError.new("foo\nbar")` now prints `#<StandardError: "foo\nbar">' instead of: #<StandardError: bar> [Bug #18170]
* [Feature #18595] Alias String#-@ as String#dedupJean Boussier2022-05-201-1/+4
|
* [DOC] Move the documentations of moved Symbol methodsNobuyoshi Nakada2022-04-141-45/+2
|
* [DOC] Enhanced RDoc for Symbol (#5796)Burdette Lamar2022-04-131-41/+31
| | | | | | | | | | | | | | | Treats: #[] #length #empty? #upcase #downcase #capitalize #swapcase #start_with? #end_with? #encoding ::all_symbols
* Enforce literals on the second argumentsNobuyoshi Nakada2022-04-131-1/+1
|
* Enhanced RDoc for Symbol (#5795)Burdette Lamar2022-04-121-92/+80
| | | | | | | | | | | | | | | | | | | Treats: #== #inspect #name #to_s #to_sym #to_proc #succ #<=> #casecmp #casecmp? #=~ #match #match?
* Fix some RDoc links (#5778)Burdette Lamar2022-04-081-11/+11
|
* All-in-one RDoc for class String (#5777)Burdette Lamar2022-04-071-416/+0
|
* [DOC] Enhanced RDoc for string slices (#5769)Burdette Lamar2022-04-061-107/+35
| | | Creates file doc/string/slices.rdoc that the string slicing methods can link to.
* Enhanced RDoc for String#index (#5759)Burdette Lamar2022-04-041-30/+1
|
* [DOC] Enhanced RDoc for String (#5753)Burdette Lamar2022-04-031-12/+2
| | | | | | | Treats: #length #bytesize
* [DOC] Enhanced RDoc for String (#5751)Burdette Lamar2022-04-021-3/+1
| | | | | | Adds to doc for String.new, also making it compliant with documentation_guide.rdoc. Fixes some broken links in io.c (that I failed to correct yesterday).
* [DOC] Enhanced RDoc for String (#5742)Burdette Lamar2022-03-311-69/+42
| | | | | | | | | | | | Treats: #force_encoding #b #valid_encoding? #ascii_only? #scrub #scrub! #unicode_normalized? Plus a couple of minor tweaks.
* Repaired What's Here sections for Range, String, Symbol, Struct (#5735)Burdette Lamar2022-03-301-184/+185
| | | Repaired What's Here sections for Range, String, Symbol, Struct.
* [DOC] Enhanced RDoc for String (#5730)Burdette Lamar2022-03-291-34/+14
| | | | | | | | | | | | Treats: #start_with? #end_with? #delete_prefix #delete_prefix! #delete_suffix #delete_suffix!
* [DOC] Enhanced RDoc for String (#5726)Burdette Lamar2022-03-281-54/+16
| | | | | | | | | | | Treats: #ljust #rjust #center #partition #rpartition
* [DOC] Enhanced RDoc for String (#5724)Burdette Lamar2022-03-271-46/+57
| | | | | | | | | | | | Treats: #scan #hex #oct #crypt #ord #sum
* [DOC] Fix references to unary operatorNobuyoshi Nakada2022-03-271-4/+4
|
* Enhanced RDoc for String (#5723)Burdette Lamar2022-03-261-47/+57
| | | | | | | | | | | | | Treats: #lstrip #lstrip! #rstrip #rstrip! #strip #strip! Adds section Whitespace in Strings.
* [DOC] Use simple references to operator methodsNobuyoshi Nakada2022-03-261-6/+5
| | | | | | | Method references is not only able to be marked up as code, also reflects `--show-hash` option. The bug that prevented the old rdoc from correctly parsing these methods was fixed last month.
* [DOC] Enhanced RDoc for String (#5707)Burdette Lamar2022-03-241-38/+15
| | | | | | | | | | Treated: #chomp #chomp! #chop #chop!
* [DOC] Enhanced RDoc for String (#5685)Burdette Lamar2022-03-221-59/+25
| | | | | | | | | | | | | Treats: #chars #codepoints #each_char #each_codepoint #each_grapheme_cluster #grapheme_clusters Also, corrects a passage in #unicode_normalize that mentioned module UnicodeNormalize, whose doc (:nodoc:, actually) says not to mention it.
* [DOC] Use RDoc inclusions in string.c (#5683)Burdette Lamar2022-03-211-5/+42
| | | | | | | | | | | | | | | | | | 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.
* [DOC] Enhanced RDoc for String (#5675)Burdette Lamar2022-03-181-86/+7
| | | | | | | | | | Treats: #split #each_line #lines #each_byte #bytes
* Add String#bytespliceShugo Maeda2022-03-181-0/+71
|
* [DOC] Enhanced RDoc for String#split (#5644)Burdette Lamar2022-03-161-52/+1
| | | | | | | | | | | * Enhanced RDoc for String#split * Enhanced RDoc for String#split * Enhanced RDoc for String#split * Enhanced RDoc for String#split * Enhanced RDoc for String#split
* Initialize mutex for crypt(3) staticallyNobuyoshi Nakada2022-03-161-24/+1
| | | | | Assuming that all platforms, where only `crypt` is available but not `crypt_r`, are POSIX-base.
* [DOC] Enhanced RDoc for String (#5635)Burdette Lamar2022-03-091-25/+24
| | | | | | | | | | | | | Treats: #count #delete #delete! #squeeze #squeeze! Adds section "Multiple Character Selectors" to doc/character_selectors.rdoc. Co-authored-by: Peter Zhu <peter@peterzhu.ca>
* [DOC] Enhanced RDoc for String (#5633)Burdette Lamar2022-03-091-38/+32
| | | | | | | | | | | Treats: #tr (revised to link to "Character Selectors" document) #tr! #tr_s #tr_s! Also renames doc/character_selector.rdoc to match its title.
* [DOC] Fix default offset of String#byterindexKazuhiro NISHIYAMA2022-03-091-2/+2
|
* [DOC] Enhanced RDoc for String #tr and #tr! (#5626)Burdette Lamar2022-03-071-27/+41
|
* [DOC] mark `rb_str_init` as `:nodoc:`Nobuyoshi Nakada2022-03-031-0/+1
| | | | | Otherwise, an empty entry will be generated as `String::new` along with the one from doc/string.rb.
* [DOC] Fix String#getbyte docMau Magnaguagno2022-03-011-5/+6
| | | | | | | * String#getbyte returns `nil` if `index` is out of range. * Add String#getbyte example with nil output. * Modify String#getbyte example to use negative index.
* [DOC] Move String.new to allow non US-ASCII charactersNobuyoshi Nakada2022-02-261-46/+0
|
* [DOC] Enhanced RDoc for some encoding methods (#5598)Burdette Lamar2022-02-251-40/+80
| | | | | | | | | | | | | | In String, treats: #b #scrub #scrub! #unicode_normalize #unicode_normalize! #encode #encode! Also adds a note to IO.new (suggested by @jeremyevans).
* Rename the wrong variable name `beg` to `len`Shugo Maeda2022-02-231-3/+3
|
* rb_debug_rstring_null_ptr: add newlines in the message [ci skip]Nobuyoshi Nakada2022-02-211-2/+2
| | | | | The message should end with a newline, and break the long paragraph.
* Add String#byteindex, String#byterindex, and MatchData#byteoffset (#5518)Shugo Maeda2022-02-191-9/+251
| | | | | | * Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110] Co-authored-by: NARUSE, Yui <naruse@airemix.jp>
* [DOC] Remove unnecessary `rdoc-ref:` schemesNobuyoshi Nakada2022-02-121-11/+11
|
* [DOC] Simplify operator method referencesNobuyoshi Nakada2022-02-121-10/+12
|
* Remove extraneous "." in String#+@ documentationPaarth Madan2022-02-081-1/+1
|
* [DOC] Fix broken links to operator methodsNobuyoshi Nakada2022-02-081-1/+1
| | | | | Once https://github.com/ruby/rdoc/pull/865 is merged, these hacks are no longer needed.
* [DOC] Fix broken links to case_mapping.rdocNobuyoshi Nakada2022-02-081-11/+11
|
* [DOC] Fix broken links to literals.rdocNobuyoshi Nakada2022-02-081-4/+4
|