Skip to content

Commit 85f9b74

Browse files
authored
Merge pull request #876 from byroot/isalpha-locale
Use locale indepenent version of `islapha`
2 parents 5e61cd7 + 1ba1e9b commit 85f9b74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/json/ext/parser/parser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static VALUE rstring_cache_fetch(rvalue_cache *cache, const char *str, const lon
124124
return Qfalse;
125125
}
126126

127-
if (RB_UNLIKELY(!isalpha((unsigned char)str[0]))) {
127+
if (RB_UNLIKELY(!rb_isalpha((unsigned char)str[0]))) {
128128
// Simple heuristic, if the first character isn't a letter,
129129
// we're much less likely to see this string again.
130130
// 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
176176
return Qfalse;
177177
}
178178

179-
if (RB_UNLIKELY(!isalpha((unsigned char)str[0]))) {
179+
if (RB_UNLIKELY(!rb_isalpha((unsigned char)str[0]))) {
180180
// Simple heuristic, if the first character isn't a letter,
181181
// we're much less likely to see this string again.
182182
// We mostly want to cache strings that are likely to be repeated.

0 commit comments

Comments
 (0)