diff --git a/ChangeLog b/ChangeLog index 5782fb9cb7..0b2d2eed31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 19 05:54:11 2009 Marc-Andre Lafortune + + * 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 * win32/win32.c (CreateChild): recognize escape characters. diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index 3db87c6126..1f443956c8 100644 --- a/lib/rexml/element.rb +++ b/lib/rexml/element.rb @@ -492,7 +492,7 @@ module REXML 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