ruby-changes:14952
From: naruse <ko1@a...>
Date: Fri, 5 Mar 2010 19:48:13 +0900 (JST)
Subject: [ruby-changes:14952] Ruby:r26823 (trunk): * transcode.c (econv_opts): set :undef => :replace when
naruse 2010-03-05 19:39:56 +0900 (Fri, 05 Mar 2010) New Revision: 26823 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26823 Log: * transcode.c (econv_opts): set :undef => :replace when :replace is given and :invalid is not given. [ruby-dev:40554] Modified files: trunk/ChangeLog trunk/transcode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26822) +++ ChangeLog (revision 26823) @@ -1,3 +1,8 @@ +Fri Mar 5 19:36:12 2010 NARUSE, Yui <naruse@r...> + + * transcode.c (econv_opts): set :undef => :replace when + :replace is given and :invalid is not given. [ruby-dev:40554] + Fri Mar 5 17:51:09 2010 Nobuyoshi Nakada <nobu@r...> * io.c (pipe_open): suppressed a warning. Index: transcode.c =================================================================== --- transcode.c (revision 26822) +++ transcode.c (revision 26823) @@ -2394,6 +2394,11 @@ rb_raise(rb_eArgError, "unknown value for undefined character option"); } + v = rb_hash_aref(opt, sym_replace); + if (!NIL_P(v) && !(ecflags & ECONV_INVALID_REPLACE)) { + ecflags |= ECONV_UNDEF_REPLACE; + } + v = rb_hash_aref(opt, sym_xml); if (!NIL_P(v)) { if (v==sym_text) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/