aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 25946dccda..54b4c07da2 100644
--- a/parse.y
+++ b/parse.y
@@ -10231,6 +10231,7 @@ rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int a
const char *e = m + len;
int type = ID_JUNK;
+ if (!rb_enc_asciicompat(enc)) return -1;
if (!m || len <= 0) return -1;
switch (*m) {
case '\0':