ruby-changes:11846
From: yugui <ko1@a...>
Date: Wed, 20 May 2009 21:16:38 +0900 (JST)
Subject: [ruby-changes:11846] Ruby:r23501 (trunk): * rb_enc_get_index: allows an arbitrary RData as the argument but not
yugui 2009-05-20 21:16:23 +0900 (Wed, 20 May 2009) New Revision: 23501 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23501 Log: * rb_enc_get_index: allows an arbitrary RData as the argument but not only what points a rb_encoding. Modified files: trunk/ChangeLog trunk/encoding.c Index: encoding.c =================================================================== --- encoding.c (revision 23500) +++ encoding.c (revision 23501) @@ -566,6 +566,7 @@ VALUE tmp; switch (BUILTIN_TYPE(obj)) { +as_default: default: case T_STRING: case T_REGEXP: @@ -586,6 +587,9 @@ if (RDATA(obj)->dmark == enc_mark) { i = enc_check_encoding(obj); } + else { + goto as_default; + } break; } return i; Index: ChangeLog =================================================================== --- ChangeLog (revision 23500) +++ ChangeLog (revision 23501) @@ -1,3 +1,8 @@ +Wed May 20 21:00:27 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * rb_enc_get_index: allows an arbitrary RData as the argument but not + only what points a rb_encoding. + Wed May 20 20:54:37 2009 Yuki Sonoda (Yugui) <yugui@y...> * spec/.gitignore: ignores rubyspec/ and mspec/. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/