summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/rexml/element.rb2
-rw-r--r--version.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bfc3eb84b7..06f56dc394 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Nov 25 16:28: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]
+
Wed Nov 25 16:18:37 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_clear_cache_for_undef): clear entries for inherited
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
diff --git a/version.h b/version.h
index 369361cab9..b2f28d7a68 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2009-11-25"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20091125
-#define RUBY_PATCHLEVEL 221
+#define RUBY_PATCHLEVEL 222
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8