diff options
| author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-18 20:54:36 +0000 |
|---|---|---|
| committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-18 20:54:36 +0000 |
| commit | d192b48cacd74e99e0fbbca7f96cc12e6b4a09a7 (patch) | |
| tree | 5f23576f76f2751beb519dfc182384420cf80e58 | |
| parent | 7f0faaf21cb52e401acafbdfea83fb69561db4f9 (diff) | |
* 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/branches/ruby_1_8@25396 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:54:11 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] + Fri Oct 16 16:42:57 2009 NAKAMURA Usaku <usa@ruby-lang.org> * 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 |
