ruby-changes:8534
From: nobu <ko1@a...>
Date: Fri, 31 Oct 2008 11:35:56 +0900 (JST)
Subject: [ruby-changes:8534] Ruby:r20068 (trunk): * encoding.c (rb_enc_set_default_internal): no alias "internal" if
nobu 2008-10-31 11:35:41 +0900 (Fri, 31 Oct 2008) New Revision: 20068 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20068 Log: * encoding.c (rb_enc_set_default_internal): no alias "internal" if defalt internal is not set. [ruby-dev:37000] Modified files: trunk/ChangeLog trunk/encoding.c Index: encoding.c =================================================================== --- encoding.c (revision 20067) +++ encoding.c (revision 20068) @@ -1101,8 +1101,13 @@ if (default_internal_index != -2) /* Already set */ return; - default_internal_index = encoding == Qnil ? - -1 :rb_enc_to_index(rb_to_encoding(encoding)); + if (NIL_P(encoding)) { + default_internal_index = -1; + default_internal = 0; + return; + } + + default_internal_index = rb_enc_to_index(rb_to_encoding(encoding)); /* Convert US-ASCII => UTF-8 */ if (default_internal_index == rb_usascii_encindex()) default_internal_index = rb_utf8_encindex(); Index: ChangeLog =================================================================== --- ChangeLog (revision 20067) +++ ChangeLog (revision 20068) @@ -1,3 +1,8 @@ +Fri Oct 31 11:35:38 2008 Nobuyoshi Nakada <nobu@r...> + + * encoding.c (rb_enc_set_default_internal): no alias "internal" if + defalt internal is not set. [ruby-dev:37000] + Fri Oct 31 08:16:14 2008 Nobuyoshi Nakada <nobu@r...> * ruby.c (process_options): delays setting safe level. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/