ruby-changes:13613
From: marcandre <ko1@a...>
Date: Mon, 19 Oct 2009 05:54:50 +0900 (JST)
Subject: [ruby-changes:13613] Ruby:r25396 (ruby_1_8): * lib/rexml/element.rb (text=): false should be converted to string.
marcandre 2009-10-19 05:54:36 +0900 (Mon, 19 Oct 2009) New Revision: 25396 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25396 Log: * lib/rexml/element.rb (text=): false should be converted to string. A patch by Teruo Oshida [ruby-dev:38351] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/rexml/element.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 25395) +++ ruby_1_8/ChangeLog (revision 25396) @@ -1,3 +1,8 @@ +Mon Oct 19 05:54:11 2009 Marc-Andre Lafortune <ruby-core@m...> + + * lib/rexml/element.rb (text=): false should be converted to string. + A patch by Teruo Oshida [ruby-dev:38351] + Fri Oct 16 16:42:57 2009 NAKAMURA Usaku <usa@r...> * win32/win32.c (CreateChild): recognize escape characters. Index: ruby_1_8/lib/rexml/element.rb =================================================================== --- ruby_1_8/lib/rexml/element.rb (revision 25395) +++ ruby_1_8/lib/rexml/element.rb (revision 25396) @@ -492,7 +492,7 @@ def text=( text ) if text.kind_of? String text = Text.new( text, whitespace(), nil, raw() ) - elsif text and !text.kind_of? Text + elsif !text.nil? and !text.kind_of? Text text = Text.new( text.to_s, whitespace(), nil, raw() ) end old_text = get_text -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/