Move `Symbol#empty?` from the C `sym_empty` into `symbol.rb`, implemented as `RBOOL(RSTRING_LEN(rb_sym2str(self)) == 0)`, mirroring the existing Symbol#to_s and #name leaf builtins. Also added an `annotate_builtin! ` in `zjit/src/cruby_...sampokuokkanen (Sampo Kuokkanen)
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, YJ...sampokuokkanen (Sampo Kuokkanen)
Read the cached coderange directly (flags & MASK) instead of calling the builtin: ascii_only? is == 7BIT, valid_encoding? is != BROKEN, side-exit on UNKNOWN. Drops the call, ~20% faster on ZJIT.sampokuokkanen (Sampo Kuokkanen)
String#casecmp? folds both operands with a Unicode case fold, allocating two new strings, and compares the results. For ASCII-only strings, Unicode case folding is equivalent to ASCII case-insensitive comparison, so the operands can be c...sampokuokkanen (Sampo Kuokkanen)
#upcase/#downcase already case-map ASCII strings with a plain byte loop, but #capitalize/#capitalize! always went through full Unicode case-mapping, making them ~10x slower on the same input. Add capitalize_single (mirroring upcase_singl...sampokuokkanen (Sampo Kuokkanen)
The method used explicit `super(*args, **kw)`, which made the test an exact duplicate of test_explicit_super_kwsplat and never exercised the zsuper code path its name implies. Use bare `super` so it actually tests implicit super.sampokuokkanen (Sampo Kuokkanen)
`test_yjit_enable_with_invalid_runtime_call_threshold_option` was passing `mem_size: 0`, which is identical to the `mem_size` test right below it. Invalid `call_threshold` was never actually tested. Pass `call_threshold: 0` instead.sampokuokkanen (Sampo Kuokkanen)
Both assertions tested `[].length == 0` rather than `res.length`, so the test passed even when `each_value` yielded nothing.sampokuokkanen (Sampo Kuokkanen)
`S("hello").upcase` was asserted twice, leaving mixed-case input uncovered. Mirror test_downcase's `S("helLO")` shape. Also removed duplicate test on line 854.sampokuokkanen (Sampo Kuokkanen)