diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -9505,6 +9505,10 @@ rb_intern3(const char *name, long len, rb_encoding *enc) str = (VALUE)&fake_str; rb_enc_associate(str, enc); + if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { + rb_raise(rb_eEncodingError, "invalid encoding symbol"); + } + if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id)) return id; |