Remove NonConcattingString.
This commit is contained in:
parent
ba52748d05
commit
3c8e1f99b9
|
@ -6,9 +6,6 @@ require 'active_support/ordered_options'
|
|||
require 'action_view/log_subscriber'
|
||||
|
||||
module ActionView #:nodoc:
|
||||
class NonConcattingString < ActiveSupport::SafeBuffer
|
||||
end
|
||||
|
||||
# = Action View Base
|
||||
#
|
||||
# Action View templates can be written in three ways. If the template file has a <tt>.erb</tt> (or <tt>.rhtml</tt>) extension then it uses a mixture of ERb
|
||||
|
|
|
@ -38,7 +38,7 @@ module ActionView
|
|||
value = nil
|
||||
buffer = with_output_buffer { value = yield(*args) }
|
||||
if string = buffer.presence || value and string.is_a?(String)
|
||||
NonConcattingString.new(string)
|
||||
string
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ class CaptureHelperTest < ActionView::TestCase
|
|||
end
|
||||
assert_nil @av.output_buffer
|
||||
assert_equal 'foobar', string
|
||||
assert_kind_of ActionView::NonConcattingString, string
|
||||
end
|
||||
|
||||
def test_capture_captures_the_value_returned_by_the_block_if_the_temporary_buffer_is_blank
|
||||
|
@ -23,7 +22,6 @@ class CaptureHelperTest < ActionView::TestCase
|
|||
a + b
|
||||
end
|
||||
assert_equal 'foobar', string
|
||||
assert_kind_of ActionView::NonConcattingString, string
|
||||
end
|
||||
|
||||
def test_capture_returns_nil_if_the_returned_value_is_not_a_string
|
||||
|
|
Loading…
Reference in New Issue