diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 09:19:15 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 09:19:15 +0000 |
commit | 4574cf872b0efe4e0b6ef180a5e273fccf0b628e (patch) | |
tree | 5a7cfc28983ed2e26680686bc23eb47de95fa813 /parse.y | |
parent | 8c2372933098e73a549e0c8ce7c9edc94c03e38a (diff) | |
download | ruby-4574cf872b0efe4e0b6ef180a5e273fccf0b628e.tar.gz ruby-4574cf872b0efe4e0b6ef180a5e273fccf0b628e.tar.xz ruby-4574cf872b0efe4e0b6ef180a5e273fccf0b628e.zip |
* time.c (time_strftime): format should be ascii compatible.
* parse.y (rb_intern3): non ASCII compatible symbols.
* re.c (rb_reg_regsub): add encoding check.
* string.c (rb_str_chomp_bang): ditto.
* test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -9008,6 +9008,10 @@ rb_intern3(const char *name, long len, rb_encoding *enc) if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id)) return id; + if (rb_cString && !rb_enc_asciicompat(enc)) { + id = ID_JUNK; + goto new_id; + } last = len-1; id = 0; switch (*m) { |