diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-10-27 09:52:58 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-10-27 09:21:38 +0000 |
| commit | 14cbe0de8ba0736aa8f5c20b0eb9c51d71900cb3 (patch) | |
| tree | 64de937ada876999318117f25e727090767a9dd9 /ext/json/parser | |
| parent | d0a6780d1ec267e382053eae46ccf681f13dd50f (diff) | |
[ruby/json] Use locale indepenent version of `islapha`
https://github.com/ruby/json/commit/1ba1e9bef9
Diffstat (limited to 'ext/json/parser')
| -rw-r--r-- | ext/json/parser/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c index 297031dcf1..2522c56224 100644 --- a/ext/json/parser/parser.c +++ b/ext/json/parser/parser.c @@ -124,7 +124,7 @@ static VALUE rstring_cache_fetch(rvalue_cache *cache, const char *str, const lon return Qfalse; } - if (RB_UNLIKELY(!isalpha((unsigned char)str[0]))) { + if (RB_UNLIKELY(!rb_isalpha((unsigned char)str[0]))) { // Simple heuristic, if the first character isn't a letter, // we're much less likely to see this string again. // We mostly want to cache strings that are likely to be repeated. @@ -176,7 +176,7 @@ static VALUE rsymbol_cache_fetch(rvalue_cache *cache, const char *str, const lon return Qfalse; } - if (RB_UNLIKELY(!isalpha((unsigned char)str[0]))) { + if (RB_UNLIKELY(!rb_isalpha((unsigned char)str[0]))) { // Simple heuristic, if the first character isn't a letter, // we're much less likely to see this string again. // We mostly want to cache strings that are likely to be repeated. |
