ruby-changes:3706
From: ko1@a...
Date: Thu, 24 Jan 2008 01:06:15 +0900 (JST)
Subject: [ruby-changes:3706] naruse - Ruby:r15195 (trunk): * parse.y (parser_str_new, rb_intern3): ascii only string literal is US-ASCII.
naruse 2008-01-24 01:05:57 +0900 (Thu, 24 Jan 2008) New Revision: 15195 Modified files: trunk/ChangeLog trunk/parse.y Log: * parse.y (parser_str_new, rb_intern3): ascii only string literal is US-ASCII. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=15195&r2=15194&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15195&r2=15194&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 15194) +++ ChangeLog (revision 15195) @@ -2,6 +2,9 @@ * encoding.{c, h} (rb_usascii_encoding): added. + * parse.y (parser_str_new, rb_intern3): ascii only string literal is + US-ASCII. + Wed Jan 23 23:54:40 2008 Yusuke Endoh <mame@t...> * sprintf.c: fix comment. [ruby-dev:33275] Index: parse.y =================================================================== --- parse.y (revision 15194) +++ parse.y (revision 15195) @@ -4845,7 +4845,7 @@ 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 @@ } } 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 @@ for (; m <= name + len; ++m) { if (!ISASCII(*m)) goto mbstr; } - enc = rb_ascii8bit_encoding(); + enc = rb_usascii_encoding(); } mbstr:; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/