ruby-changes:10023
From: yugui <ko1@a...>
Date: Fri, 16 Jan 2009 00:40:54 +0900 (JST)
Subject: [ruby-changes:10023] Ruby:r21566 (ruby_1_9_1): merges r21528 from trunk into ruby_1_9_1.
yugui 2009-01-16 00:40:06 +0900 (Fri, 16 Jan 2009) New Revision: 21566 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21566 Log: merges r21528 from trunk into ruby_1_9_1. * encoding.c (enc_set_default_encoding): should not treat US-ASCII special here. a patch from Yui NARUSE in [ruby-dev:37769]. [ruby-dev:37699] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/encoding.c Index: ruby_1_9_1/encoding.c =================================================================== --- ruby_1_9_1/encoding.c (revision 21565) +++ ruby_1_9_1/encoding.c (revision 21566) @@ -1050,8 +1050,7 @@ }; static int -enc_set_default_encoding(struct default_encoding *def, VALUE encoding, - const char *name, int defindex) +enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const char *name) { int overridden = Qfalse; if (def->index != -2) @@ -1066,8 +1065,6 @@ } else { def->index = rb_enc_to_index(rb_to_encoding(encoding)); - if (def->index == ENCINDEX_US_ASCII) - def->index = defindex; def->enc = 0; enc_alias_internal(name, def->index); } @@ -1118,7 +1115,7 @@ rb_raise(rb_eArgError, "default external can not be nil"); } enc_set_default_encoding(&default_external, encoding, - "external", ENCINDEX_US_ASCII); + "external"); } /* @@ -1171,7 +1168,7 @@ rb_enc_set_default_internal(VALUE encoding) { enc_set_default_encoding(&default_internal, encoding, - "internal", ENCINDEX_UTF_8); + "internal"); } /* Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21565) +++ ruby_1_9_1/ChangeLog (revision 21566) @@ -1,3 +1,9 @@ +Thu Jan 15 15:55:31 2009 Yukihiro Matsumoto <matz@r...> + + * encoding.c (enc_set_default_encoding): should not treat US-ASCII + special here. a patch from Yui NARUSE in [ruby-dev:37769]. + [ruby-dev:37699] + Thu Jan 15 13:10:09 2009 Nobuyoshi Nakada <nobu@r...> * configure.in, win32/Makefile.sub (MISSING): added langinfo on mingw -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/