From 5498b5a4c79cf806390c601f44c74d1cfb3c77b9 Mon Sep 17 00:00:00 2001 From: marcandre Date: Sun, 18 Oct 2009 20:54:29 +0000 Subject: * lib/rexml/element.rb (text=): false should be converted to string. A patch by Teruo Oshida [ruby-dev:38351] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/element.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rexml') diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index 7a3abc65e5..f999b0b2b1 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 -- cgit v1.2.3