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'
|
require 'action_view/log_subscriber'
|
||||||
|
|
||||||
module ActionView #:nodoc:
|
module ActionView #:nodoc:
|
||||||
class NonConcattingString < ActiveSupport::SafeBuffer
|
|
||||||
end
|
|
||||||
|
|
||||||
# = Action View Base
|
# = 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
|
# 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
|
value = nil
|
||||||
buffer = with_output_buffer { value = yield(*args) }
|
buffer = with_output_buffer { value = yield(*args) }
|
||||||
if string = buffer.presence || value and string.is_a?(String)
|
if string = buffer.presence || value and string.is_a?(String)
|
||||||
NonConcattingString.new(string)
|
string
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ class CaptureHelperTest < ActionView::TestCase
|
||||||
end
|
end
|
||||||
assert_nil @av.output_buffer
|
assert_nil @av.output_buffer
|
||||||
assert_equal 'foobar', string
|
assert_equal 'foobar', string
|
||||||
assert_kind_of ActionView::NonConcattingString, string
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_capture_captures_the_value_returned_by_the_block_if_the_temporary_buffer_is_blank
|
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
|
a + b
|
||||||
end
|
end
|
||||||
assert_equal 'foobar', string
|
assert_equal 'foobar', string
|
||||||
assert_kind_of ActionView::NonConcattingString, string
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_capture_returns_nil_if_the_returned_value_is_not_a_string
|
def test_capture_returns_nil_if_the_returned_value_is_not_a_string
|
||||||
|
|
Loading…
Reference in New Issue