diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-18 20:54:29 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-18 20:54:29 +0000 |
commit | 5498b5a4c79cf806390c601f44c74d1cfb3c77b9 (patch) | |
tree | 0ea48e126e1e1e2e626874817115fd93f9c022df | |
parent | a542b9248e8cfda87a73d57cf7438c9e86d41c1f (diff) | |
download | ruby-5498b5a4c79cf806390c601f44c74d1cfb3c77b9.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rexml/element.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Oct 19 05:49:53 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca> + + * lib/rexml/element.rb (text=): false should be converted to string. + A patch by Teruo Oshida [ruby-dev:38351] + Sun Oct 18 22:33:25 2009 Tadayoshi Funaba <tadf@dotrb.org> * lib/date.rb: do not require lib/delta.rb. 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 |