ruby-changes:3329
From: ko1@a...
Date: 1 Jan 2008 01:29:26 +0900
Subject: [ruby-changes:3329] nobu - Ruby:r14822 (trunk): * encoding.c (rb_to_encoding): raises for non-nil, non-encoding,
nobu 2008-01-01 01:29:06 +0900 (Tue, 01 Jan 2008) New Revision: 14822 Modified files: trunk/ChangeLog trunk/encoding.c Log: * encoding.c (rb_to_encoding): raises for non-nil, non-encoding, non-string object. [ruby-core:14634] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14822&r2=14821&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=14822&r2=14821&diff_format=u Index: encoding.c =================================================================== --- encoding.c (revision 14821) +++ encoding.c (revision 14822) @@ -100,9 +100,6 @@ if (NIL_P(enc)) return 0; idx = enc_check_encoding(enc); if (idx >= 0) return RDATA(enc)->data; - if (NIL_P(enc = rb_check_string_type(enc))) { - return 0; - } if ((idx = rb_enc_find_index(StringValueCStr(enc))) < 0) { rb_raise(rb_eArgError, "unknown encoding name - %s", RSTRING_PTR(enc)); } Index: ChangeLog =================================================================== --- ChangeLog (revision 14821) +++ ChangeLog (revision 14822) @@ -1,3 +1,8 @@ +Tue Jan 1 01:29:04 2008 Nobuyoshi Nakada <nobu@r...> + + * encoding.c (rb_to_encoding): raises for non-nil, non-encoding, + non-string object. [ruby-core:14634] + Tue Jan 1 01:04:06 2008 Nobuyoshi Nakada <nobu@r...> * ruby.c (process_options): rejects dummy encoding. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml