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 | 5099db8eaf5f6325be3340956969e52bc715c01c (patch) | |
| tree | 0ea48e126e1e1e2e626874817115fd93f9c022df /lib/rexml | |
| parent | 38dbbea36f7c8a57663799f80bd6fbf92552224c (diff) | |
| download | ruby-5099db8eaf5f6325be3340956969e52bc715c01c.tar.gz ruby-5099db8eaf5f6325be3340956969e52bc715c01c.tar.xz ruby-5099db8eaf5f6325be3340956969e52bc715c01c.zip | |
* lib/rexml/element.rb (text=): false should be converted to string.
A patch by Teruo Oshida [ruby-dev:38351]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
| -rw-r--r-- | lib/rexml/element.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index 7a3abc65e..f999b0b2b 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 |
