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?
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>
- 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.
* 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.