diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-23 16:05:57 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-23 16:05:57 +0000 |
commit | 5e3bb6c3aef7826fd9de646e16af53a2fde6c877 (patch) | |
tree | 52b281231f42f299be5760102f7b00cfc5cc5b8a /parse.y | |
parent | 1ccb0642edb91dfab77861bab700d07329e361ed (diff) | |
download | ruby-5e3bb6c3aef7826fd9de646e16af53a2fde6c877.tar.gz |
* parse.y (parser_str_new, rb_intern3): ascii only string literal is US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4845,7 +4845,7 @@ parser_str_new(const char *p, long n, rb_encoding *enc, int func) if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc) && rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { - rb_enc_associate(str, rb_ascii8bit_encoding()); + rb_enc_associate(str, rb_usascii_encoding()); } return str; @@ -8976,7 +8976,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc) } } if (m - name < len) id = ID_JUNK; - if (enc != rb_ascii8bit_encoding()) { + if (enc != rb_usascii_encoding()) { /* * this clause makes sense only when called from other than * rb_intern_str() taking care of code-range. @@ -8985,7 +8985,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc) for (; m <= name + len; ++m) { if (!ISASCII(*m)) goto mbstr; } - enc = rb_ascii8bit_encoding(); + enc = rb_usascii_encoding(); } mbstr:; } |