File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
actionview/lib/action_view Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,7 @@ def setup_with_controller
110
110
@controller = controller_class . new
111
111
@request = @controller . request
112
112
@view_flow = ActionView ::OutputFlow . new
113
- # empty string ensures buffer has UTF-8 encoding as
114
- # new without arguments returns ASCII-8BIT encoded buffer like String#new
115
- @output_buffer = ActiveSupport ::SafeBuffer . new ""
113
+ @output_buffer = ActionView ::OutputBuffer . new
116
114
@rendered = +""
117
115
118
116
test_case_instance = self
@@ -181,7 +179,7 @@ def _test_case
181
179
private
182
180
# Need to experiment if this priority is the best one: rendered => output_buffer
183
181
def document_root_element
184
- Nokogiri ::HTML ::Document . parse ( @rendered . blank? ? @output_buffer : @rendered ) . root
182
+ Nokogiri ::HTML ::Document . parse ( @rendered . blank? ? @output_buffer . to_str : @rendered ) . root
185
183
end
186
184
187
185
module Locals
You can’t perform that action at this time.
0 commit comments