summaryrefslogtreecommitdiff
path: root/ext/json/parser/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/parser/parser.c')
-rw-r--r--ext/json/parser/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index 9cbe2c1d7e..c21a5fda5f 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -135,7 +135,7 @@ static VALUE rstring_cache_fetch(rvalue_cache *cache, const char *str, const lon
return Qfalse;
}
- if (RB_UNLIKELY(!isalpha(str[0]))) {
+ if (RB_UNLIKELY(!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.
@@ -187,7 +187,7 @@ static VALUE rsymbol_cache_fetch(rvalue_cache *cache, const char *str, const lon
return Qfalse;
}
- if (RB_UNLIKELY(!isalpha(str[0]))) {
+ if (RB_UNLIKELY(!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.