Commit Graph
25 Commits
Author SHA1 Message Date
Sampo Kuokkanen 93e977936f Define String#ascii_only? and #valid_encoding? in Ruby
Get rid of the CFUNC overhead in String#ascii_only? and #valid_encoding?. Define them as leaf Primitive.cexpr! builtins in a new string.rb, following the pattern of numeric.rb.

This makes them 1.2x-1.4x faster across the interpreter, YJIT, and
ZJIT.

Move ZJIT's cfunc annotation for String#ascii_only? to annotate_builtin!, and add one for String#valid_encoding?.

Fix CI for builtin String#ascii_only?
2026-06-24 17:17:33 -04:00
Nobuyoshi Nakada 9760ec6f57 [DOC] Move document only source to doc 2025-07-11 17:32:17 +09:00
BurdetteLamar 14971e75ce [DOC] Tweaks for String#center 2025-07-08 13:26:46 -04:00
Burdette Lamar e9d7e105ef [DOC] Tweaks for String#casecmp? (#13810) 2025-07-07 15:14:56 -04:00
BurdetteLamar c2c0c220a8 [DOC] Tweaks for String#casecmp 2025-07-07 15:10:17 -04:00
Burdette Lamar 35feaee917 [DOC] Tweaks for String#bytesplice 2025-06-30 14:13:09 -04:00
Burdette Lamar ec071c849f [DOC] Tweaks for String#byterindex (#13485) 2025-06-25 10:51:45 -04:00
Burdette LamarandPeter Zhu b080aabb22 Update string.rb
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2025-05-22 10:17:46 -04:00
BurdetteLamar 3403055d13 [DOC] Tweaks for String#byteindex 2025-05-22 10:17:46 -04:00
BurdetteLamar 7a660d7c69 [DOC] Tweaks for What's Here 2025-05-08 16:34:33 -04:00
Nobuyoshi Nakada e433e6515e [DOC] Exclude 'Class' and 'Module' from RDoc's autolinking 2025-01-02 12:36:06 +09:00
Nobuyoshi Nakada b4ec22fe6c [DOC] Exclude 'Method' from RDoc's autolinking 2025-01-02 12:23:49 +09:00
Stan LoandJeremy Evans 77016a7b43 [DOC] Fix grammar errors, typos, and improve readability of string.rb
Because this file's comments have one extra space after the `#` sign,
almost every line is updated. IMO, it's better to address this issue
in one go.

Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2024-12-14 01:19:22 +00:00
Holger Just 7081838d2a [DOC] String#sub! and String#gsub! return nil if no replacement occured 2024-10-07 17:20:03 +09:00
Peter Zhu 1adcc41b94 [DOC] What's Here for String#append_as_bytes
String#append_as_bytes was newly introduced in #11552.
2024-09-10 15:38:54 -04:00
Peter Zhu 88723dd5a5 [DOC] Fix missing colons in String 2024-09-09 15:28:05 -04:00
Burdette Lamar bd7bc9e2ba [DOC] Rationalize aliases in "What's Here" (#11517) 2024-09-09 15:26:00 -04:00
BurdetteLamar ac85eef18b Fix links 2024-05-18 15:44:24 +09:00
Burdette Lamar 65f5435540 [DOC] Doc compliance (#9955) 2024-02-14 10:47:42 -05:00
Nobuyoshi Nakada caa9881fde [DOC] Fix doc/regexp.rdoc links
- Rename regexp.rdoc to exclude from "Pages".  This file is for to be
  included in the "class Regexp" document, but it also appeared as a
  separate page duplicately.
- Fix links on case-sensitive filesystems.
- Fix to use rdoc-ref instead of converted HTML page names.
2023-11-14 15:56:57 +09:00
Burdette Lamar 8c5b9ebf71 [DOC] Improve doc guide compliance (#8221) 2023-08-15 14:43:58 -04:00
Burdette Lamar 932dd9f10e [DOC] Regexp doc (#7923) 2023-06-20 09:28:21 -04:00
Kazuhiro NISHIYAMA 5cffa69c1b [DOC] Add missing escape
Before:
```
* + corresponds to $+, which contains last capture group.
```

After:
```
* \+ corresponds to $+, which contains last capture group.
```
2023-03-16 18:37:19 +09:00
Alexander Ilyin adcfd69690 [DOC] Fix markup for String (#5984)
* 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.
2022-06-09 13:40:21 -05:00
Burdette Lamar 9ca3d537b9 All-in-one RDoc for class String (#5777) 2022-04-07 14:29:04 -05:00