From 0e1cb279ea428445dc8b4f0642cd5a5c78b8807f Mon Sep 17 00:00:00 2001 From: kou Date: Sun, 7 Jul 2013 02:50:38 +0000 Subject: [PATCH] * lib/rexml/text.rb (REXML::Text#<<): Support appending in not "raw" mode. [Bug #8602] [ruby-dev:47482] Reported by Ippei Obayashi. Thanks!!! * test/rexml/test_text.rb (TextTester#test_shift_operator_cache): Add a test for the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ lib/rexml/text.rb | 1 + 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index a78b0f9f8f..fc6ee0d0a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Jul 7 11:49:19 2013 Kouhei Sutou + + * lib/rexml/text.rb (REXML::Text#<<): Support appending in not + "raw" mode. [Bug #8602] [ruby-dev:47482] + Reported by Ippei Obayashi. Thanks!!! + * test/rexml/test_text.rb (TextTester#test_shift_operator_cache): + Add a test for the above case. + Sun Jul 7 11:43:13 2013 Kouhei Sutou * lib/rexml/text.rb (REXML::Text#<<): Support method chain use by "<<" diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb index 0e45265a17..d3242ee46d 100644 --- a/lib/rexml/text.rb +++ b/lib/rexml/text.rb @@ -191,6 +191,7 @@ module REXML # 'text << "XXX" << "YYY"'. def <<( to_append ) @string << to_append.gsub( /\r\n?/, "\n" ) + clear_cache self end