aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y9
1 files changed, 7 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 3f4b8c29ce..8f7c90a3cd 100644
--- a/parse.y
+++ b/parse.y
@@ -8966,8 +8966,13 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
mb = 0;
if (!rb_enc_isdigit(*m, enc)) {
while (m <= name + last && is_identchar(m, e, enc)) {
- if (!ISASCII(*m)) mb = 1;
- m += rb_enc_mbclen(m, e, enc);
+ if (ISASCII(*m)) {
+ m++;
+ }
+ else {
+ mb = 1;
+ m += rb_enc_mbclen(m, e, enc);
+ }
}
}
if (m - name < len) id = ID_JUNK;