summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 06:49:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-05 06:49:35 +0000
commite10e309dcecd078df394b7a2966ec9a08f4c386d (patch)
treefcc8d13173c44e1c30b716f367d80937573b5d30 /parse.y
parentc5038b22eb30d01d592ba131848775e79963a3de (diff)
parse.y: symbol names must be ascii-compatible
* parse.y (rb_enc_symname_type): encoding of symbol names must be ascii-compatible, reject ascii-incompatible encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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':