diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-05 06:49:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-05 06:49:35 +0000 |
commit | e10e309dcecd078df394b7a2966ec9a08f4c386d (patch) | |
tree | fcc8d13173c44e1c30b716f367d80937573b5d30 /parse.y | |
parent | c5038b22eb30d01d592ba131848775e79963a3de (diff) | |
download | ruby-e10e309dcecd078df394b7a2966ec9a08f4c386d.tar.gz |
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.y | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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': |