Commit b154cfa
committed
Add a fastpath for
This extra check is a hotspot for path operations on
macOS.
It was added in 9962aad
because of a limitation of HFS+.
But all the invalid characters are outside of ASCII range,
and most paths are ASCII, so we can optimistically check
the coderange instead.
Most `rb_str_normalize_ospath` were first checking for ASCII
range, but a few like `rb_dir_getwd_ospath` in `dir.c` or
`ospath_new` in `file.c` didn't.rb_str_normalize_ospath
1 parent 36b0ae0 commit b154cfa
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | 383 | | |
385 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
386 | 392 | | |
387 | 393 | | |
388 | 394 | | |
| |||
0 commit comments