From ebfca248f9084f8176f6b5b993d9c3c99d06737b Mon Sep 17 00:00:00 2001 From: Casebook Developer Date: Thu, 4 Aug 2011 13:34:47 -0400 Subject: ActionView::Helpers::TextHelper#simple_format should not change the text in place. Now it duplicates it. --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index ae71ade588..21074efe86 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -256,7 +256,7 @@ module ActionView # # => "

I'm allowed! It's true.

" def simple_format(text, html_options={}, options={}) text = '' if text.nil? - text = text.dup if text.frozen? + text = text.dup start_tag = tag('p', html_options, true) text = sanitize(text) unless options[:sanitize] == false text = text.to_str -- cgit v1.2.3