diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 9279a88..f83ae81 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -29,7 +29,7 @@ module ActionView ActiveSupport::Deprecation.warn("The binding argument of #concat is no longer needed. Please remove it from your views and helpers.", caller) end - output_buffer.safe_concat(string) + output_buffer.concat(string) end # Truncates a given +text+ after a given :length if +text+ is longer than :length diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 9ef0564..297be5b 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -22,6 +22,12 @@ class TextHelperTest < ActionView::TestCase assert_equal 'foobar', output_buffer end + def test_safe_concat + self.output_buffer = ActiveSupport::SafeBuffer.new('foo') + assert_equal 'foobar', safe_concat('bar') + assert_equal 'foobar', output_buffer + end + def test_simple_format assert_equal "

", simple_format(nil)