<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -156,10 +156,12 @@ module ActionView #:nodoc:
     attr_reader   :finder
     attr_accessor :base_path, :assigns, :template_extension, :first_render
     attr_accessor :controller
-    
+
     attr_writer :template_format
     attr_accessor :current_render_extension
 
+    attr_accessor :output_buffer
+
     # Specify trim mode for the ERB compiler. Defaults to '-'.
     # See ERb documentation for suitable values.
     @@erb_trim_mode = '-'
@@ -313,9 +315,10 @@ If you are rendering a subtemplate, you must now use controller-like partial syn
 
     private
       def wrap_content_for_layout(content)
-        original_content_for_layout = @content_for_layout
-        @content_for_layout = content
-        returning(yield) { @content_for_layout = original_content_for_layout }
+        original_content_for_layout, @content_for_layout = @content_for_layout, content
+        yield
+      ensure
+        @content_for_layout = original_content_for_layout
       end
 
       # Evaluate the local assigns and pushes them to the view.</diff>
      <filename>actionpack/lib/action_view/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,11 +31,11 @@ module ActionView
       #   &lt;/body&gt;&lt;/html&gt;
       #
       def capture(*args, &amp;block)
-        @output_buffer, old_buffer = '', @output_buffer
-        yield *args
-        @output_buffer
-      ensure
-        @output_buffer = old_buffer
+        if @output_buffer
+          with_temporary_output_buffer { yield *args }
+        else
+          block.call(*args)
+        end
       end
 
       # Calling content_for stores a block of markup in an identifier for later use.
@@ -119,6 +119,14 @@ module ActionView
       end
 
       private
+        def with_temporary_output_buffer
+          @output_buffer, old_buffer = '', @output_buffer
+          yield
+          @output_buffer
+        ensure
+          @output_buffer = old_buffer
+        end
+
         def erb_content_for(name, &amp;block)
           ivar = &quot;@content_for_#{name}&quot;
           instance_variable_set(ivar, &quot;#{instance_variable_get(ivar)}#{capture(&amp;block)}&quot;)</diff>
      <filename>actionpack/lib/action_view/helpers/capture_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,10 +11,11 @@ module ActionView
 
       def compile(template)
         content_type_handler = (@view.send!(:controller).respond_to?(:response) ? &quot;controller.response&quot; : &quot;controller&quot;)
+
         &quot;#{content_type_handler}.content_type ||= Mime::XML\n&quot; +
-        &quot;xml = ::Builder::XmlMarkup.new(:indent =&gt; 2)\n&quot; +
-        template.source +
-        &quot;\nxml.target!\n&quot;
+          &quot;xml = ::Builder::XmlMarkup.new(:indent =&gt; 2)\n&quot; +
+          template.source +
+          &quot;\nxml.target!\n&quot;
       end
 
       def cache_fragment(block, name = {}, options = nil)</diff>
      <filename>actionpack/lib/action_view/template_handlers/builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -47,7 +47,7 @@ module ActionView
       end
 
       def cache_fragment(block, name = {}, options = nil) #:nodoc:
-        @view.fragment_for(block, name, options) { @view.output_buffer }
+        @view.fragment_for(block, name, options) { @view.response.template.output_buffer ||= '' }
       end
     end
   end</diff>
      <filename>actionpack/lib/action_view/template_handlers/erb.rb</filename>
    </modified>
    <modified>
      <diff>@@ -421,6 +421,8 @@ class FragmentCachingTest &lt; Test::Unit::TestCase
     @controller.request = @request
     @controller.response = @response
     @controller.send(:initialize_current_url)
+    @controller.send(:initialize_template_class, @response)
+    @controller.send(:assign_shortcuts, @request, @response)
   end
 
   def test_fragment_cache_key
@@ -510,7 +512,7 @@ class FragmentCachingTest &lt; Test::Unit::TestCase
 
   def test_cache_erb_fragment
     @store.write('views/expensive', 'fragment content')
-    _erbout = 'generated till now -&gt; '
+    @controller.template.output_buffer = 'generated till now -&gt; '
 
     assert_equal( 'generated till now -&gt; fragment content',
                   ActionView::TemplateHandlers::ERB.new(@controller).cache_fragment(Proc.new{ }, 'expensive'))</diff>
      <filename>actionpack/test/controller/caching_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1002,17 +1002,17 @@ class DateHelperTest &lt; ActionView::TestCase
     @post = Post.new
     @post.written_on = Date.new(2004, 6, 15)
 
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for :post, @post do |f|
-      _erbout.concat f.date_select(:written_on)
+      @output_buffer.concat f.date_select(:written_on)
     end
 
     expected = &quot;&lt;select id='post_written_on_1i' name='post[written_on(1i)]'&gt;\n&lt;option value='1999'&gt;1999&lt;/option&gt;\n&lt;option value='2000'&gt;2000&lt;/option&gt;\n&lt;option value='2001'&gt;2001&lt;/option&gt;\n&lt;option value='2002'&gt;2002&lt;/option&gt;\n&lt;option value='2003'&gt;2003&lt;/option&gt;\n&lt;option selected='selected' value='2004'&gt;2004&lt;/option&gt;\n&lt;option value='2005'&gt;2005&lt;/option&gt;\n&lt;option value='2006'&gt;2006&lt;/option&gt;\n&lt;option value='2007'&gt;2007&lt;/option&gt;\n&lt;option value='2008'&gt;2008&lt;/option&gt;\n&lt;option value='2009'&gt;2009&lt;/option&gt;\n&lt;/select&gt;\n&quot;
     expected &lt;&lt; &quot;&lt;select id='post_written_on_2i' name='post[written_on(2i)]'&gt;\n&lt;option value='1'&gt;January&lt;/option&gt;\n&lt;option value='2'&gt;February&lt;/option&gt;\n&lt;option value='3'&gt;March&lt;/option&gt;\n&lt;option value='4'&gt;April&lt;/option&gt;\n&lt;option value='5'&gt;May&lt;/option&gt;\n&lt;option selected='selected' value='6'&gt;June&lt;/option&gt;\n&lt;option value='7'&gt;July&lt;/option&gt;\n&lt;option value='8'&gt;August&lt;/option&gt;\n&lt;option value='9'&gt;September&lt;/option&gt;\n&lt;option value='10'&gt;October&lt;/option&gt;\n&lt;option value='11'&gt;November&lt;/option&gt;\n&lt;option value='12'&gt;December&lt;/option&gt;\n&lt;/select&gt;\n&quot;
     expected &lt;&lt; &quot;&lt;select id='post_written_on_3i' name='post[written_on(3i)]'&gt;\n&lt;option value='1'&gt;1&lt;/option&gt;\n&lt;option value='2'&gt;2&lt;/option&gt;\n&lt;option value='3'&gt;3&lt;/option&gt;\n&lt;option value='4'&gt;4&lt;/option&gt;\n&lt;option value='5'&gt;5&lt;/option&gt;\n&lt;option value='6'&gt;6&lt;/option&gt;\n&lt;option value='7'&gt;7&lt;/option&gt;\n&lt;option value='8'&gt;8&lt;/option&gt;\n&lt;option value='9'&gt;9&lt;/option&gt;\n&lt;option value='10'&gt;10&lt;/option&gt;\n&lt;option value='11'&gt;11&lt;/option&gt;\n&lt;option value='12'&gt;12&lt;/option&gt;\n&lt;option value='13'&gt;13&lt;/option&gt;\n&lt;option value='14'&gt;14&lt;/option&gt;\n&lt;option selected='selected' value='15'&gt;15&lt;/option&gt;\n&lt;option value='16'&gt;16&lt;/option&gt;\n&lt;option value='17'&gt;17&lt;/option&gt;\n&lt;option value='18'&gt;18&lt;/option&gt;\n&lt;option value='19'&gt;19&lt;/option&gt;\n&lt;option value='20'&gt;20&lt;/option&gt;\n&lt;option value='21'&gt;21&lt;/option&gt;\n&lt;option value='22'&gt;22&lt;/option&gt;\n&lt;option value='23'&gt;23&lt;/option&gt;\n&lt;option value='24'&gt;24&lt;/option&gt;\n&lt;option value='25'&gt;25&lt;/option&gt;\n&lt;option value='26'&gt;26&lt;/option&gt;\n&lt;option value='27'&gt;27&lt;/option&gt;\n&lt;option value='28'&gt;28&lt;/option&gt;\n&lt;option value='29'&gt;29&lt;/option&gt;\n&lt;option value='30'&gt;30&lt;/option&gt;\n&lt;option value='31'&gt;31&lt;/option&gt;\n&lt;/select&gt;\n&quot;
 
-    assert_dom_equal(expected, _erbout)
+    assert_dom_equal(expected, @output_buffer)
   end
 
   def test_date_select_with_index
@@ -1287,10 +1287,10 @@ class DateHelperTest &lt; ActionView::TestCase
     @post = Post.new
     @post.updated_at = Time.local(2004, 6, 15, 16, 35)
 
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for :post, @post do |f|
-      _erbout.concat f.datetime_select(:updated_at)
+      @output_buffer.concat f.datetime_select(:updated_at)
     end
 
     expected = &quot;&lt;select id='post_updated_at_1i' name='post[updated_at(1i)]'&gt;\n&lt;option value='1999'&gt;1999&lt;/option&gt;\n&lt;option value='2000'&gt;2000&lt;/option&gt;\n&lt;option value='2001'&gt;2001&lt;/option&gt;\n&lt;option value='2002'&gt;2002&lt;/option&gt;\n&lt;option value='2003'&gt;2003&lt;/option&gt;\n&lt;option selected='selected' value='2004'&gt;2004&lt;/option&gt;\n&lt;option value='2005'&gt;2005&lt;/option&gt;\n&lt;option value='2006'&gt;2006&lt;/option&gt;\n&lt;option value='2007'&gt;2007&lt;/option&gt;\n&lt;option value='2008'&gt;2008&lt;/option&gt;\n&lt;option value='2009'&gt;2009&lt;/option&gt;\n&lt;/select&gt;\n&quot;
@@ -1299,7 +1299,7 @@ class DateHelperTest &lt; ActionView::TestCase
    expected &lt;&lt; &quot; &amp;mdash; &lt;select id='post_updated_at_4i' name='post[updated_at(4i)]'&gt;\n&lt;option value='00'&gt;00&lt;/option&gt;\n&lt;option value='01'&gt;01&lt;/option&gt;\n&lt;option value='02'&gt;02&lt;/option&gt;\n&lt;option value='03'&gt;03&lt;/option&gt;\n&lt;option value='04'&gt;04&lt;/option&gt;\n&lt;option value='05'&gt;05&lt;/option&gt;\n&lt;option value='06'&gt;06&lt;/option&gt;\n&lt;option value='07'&gt;07&lt;/option&gt;\n&lt;option value='08'&gt;08&lt;/option&gt;\n&lt;option value='09'&gt;09&lt;/option&gt;\n&lt;option value='10'&gt;10&lt;/option&gt;\n&lt;option value='11'&gt;11&lt;/option&gt;\n&lt;option value='12'&gt;12&lt;/option&gt;\n&lt;option value='13'&gt;13&lt;/option&gt;\n&lt;option value='14'&gt;14&lt;/option&gt;\n&lt;option value='15'&gt;15&lt;/option&gt;\n&lt;option selected='selected' value='16'&gt;16&lt;/option&gt;\n&lt;option value='17'&gt;17&lt;/option&gt;\n&lt;option value='18'&gt;18&lt;/option&gt;\n&lt;option value='19'&gt;19&lt;/option&gt;\n&lt;option value='20'&gt;20&lt;/option&gt;\n&lt;option value='21'&gt;21&lt;/option&gt;\n&lt;option value='22'&gt;22&lt;/option&gt;\n&lt;option value='23'&gt;23&lt;/option&gt;\n&lt;/select&gt;\n&quot;
   expected &lt;&lt; &quot; : &lt;select id='post_updated_at_5i' name='post[updated_at(5i)]'&gt;\n&lt;option value='00'&gt;00&lt;/option&gt;\n&lt;option value='01'&gt;01&lt;/option&gt;\n&lt;option value='02'&gt;02&lt;/option&gt;\n&lt;option value='03'&gt;03&lt;/option&gt;\n&lt;option value='04'&gt;04&lt;/option&gt;\n&lt;option value='05'&gt;05&lt;/option&gt;\n&lt;option value='06'&gt;06&lt;/option&gt;\n&lt;option value='07'&gt;07&lt;/option&gt;\n&lt;option value='08'&gt;08&lt;/option&gt;\n&lt;option value='09'&gt;09&lt;/option&gt;\n&lt;option value='10'&gt;10&lt;/option&gt;\n&lt;option value='11'&gt;11&lt;/option&gt;\n&lt;option value='12'&gt;12&lt;/option&gt;\n&lt;option value='13'&gt;13&lt;/option&gt;\n&lt;option value='14'&gt;14&lt;/option&gt;\n&lt;option value='15'&gt;15&lt;/option&gt;\n&lt;option value='16'&gt;16&lt;/option&gt;\n&lt;option value='17'&gt;17&lt;/option&gt;\n&lt;option value='18'&gt;18&lt;/option&gt;\n&lt;option value='19'&gt;19&lt;/option&gt;\n&lt;option value='20'&gt;20&lt;/option&gt;\n&lt;option value='21'&gt;21&lt;/option&gt;\n&lt;option value='22'&gt;22&lt;/option&gt;\n&lt;option value='23'&gt;23&lt;/option&gt;\n&lt;option value='24'&gt;24&lt;/option&gt;\n&lt;option value='25'&gt;25&lt;/option&gt;\n&lt;option value='26'&gt;26&lt;/option&gt;\n&lt;option value='27'&gt;27&lt;/option&gt;\n&lt;option value='28'&gt;28&lt;/option&gt;\n&lt;option value='29'&gt;29&lt;/option&gt;\n&lt;option value='30'&gt;30&lt;/option&gt;\n&lt;option value='31'&gt;31&lt;/option&gt;\n&lt;option value='32'&gt;32&lt;/option&gt;\n&lt;option value='33'&gt;33&lt;/option&gt;\n&lt;option value='34'&gt;34&lt;/option&gt;\n&lt;option selected='selected' value='35'&gt;35&lt;/option&gt;\n&lt;option value='36'&gt;36&lt;/option&gt;\n&lt;option value='37'&gt;37&lt;/option&gt;\n&lt;option value='38'&gt;38&lt;/option&gt;\n&lt;option value='39'&gt;39&lt;/option&gt;\n&lt;option value='40'&gt;40&lt;/option&gt;\n&lt;option value='41'&gt;41&lt;/option&gt;\n&lt;option value='42'&gt;42&lt;/option&gt;\n&lt;option value='43'&gt;43&lt;/option&gt;\n&lt;option value='44'&gt;44&lt;/option&gt;\n&lt;option value='45'&gt;45&lt;/option&gt;\n&lt;option value='46'&gt;46&lt;/option&gt;\n&lt;option value='47'&gt;47&lt;/option&gt;\n&lt;option value='48'&gt;48&lt;/option&gt;\n&lt;option value='49'&gt;49&lt;/option&gt;\n&lt;option value='50'&gt;50&lt;/option&gt;\n&lt;option value='51'&gt;51&lt;/option&gt;\n&lt;option value='52'&gt;52&lt;/option&gt;\n&lt;option value='53'&gt;53&lt;/option&gt;\n&lt;option value='54'&gt;54&lt;/option&gt;\n&lt;option value='55'&gt;55&lt;/option&gt;\n&lt;option value='56'&gt;56&lt;/option&gt;\n&lt;option value='57'&gt;57&lt;/option&gt;\n&lt;option value='58'&gt;58&lt;/option&gt;\n&lt;option value='59'&gt;59&lt;/option&gt;\n&lt;/select&gt;\n&quot;
 
-    assert_dom_equal(expected, _erbout)
+    assert_dom_equal(expected, @output_buffer)
   end
 
   def test_date_select_with_zero_value_and_no_start_year</diff>
      <filename>actionpack/test/template/date_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -337,14 +337,14 @@ class FormHelperTest &lt; ActionView::TestCase
   end
 
   def test_form_for
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :html =&gt; { :id =&gt; 'create-post' }) do |f|
-      _erbout.concat f.label(:title)
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
-      _erbout.concat f.submit('Create post')
+      @output_buffer.concat f.label(:title)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
+      @output_buffer.concat f.submit('Create post')
     end
 
     expected =
@@ -357,16 +357,16 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='commit' id='post_submit' type='submit' value='Create post' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_method
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :html =&gt; { :id =&gt; 'create-post', :method =&gt; :put }) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -378,16 +378,16 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_without_object
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, :html =&gt; { :id =&gt; 'create-post' }) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -398,17 +398,17 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_index
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(&quot;post[]&quot;, @post) do |f|
-      _erbout.concat f.label(:title)
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.label(:title)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -420,16 +420,16 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[123][secret]' type='hidden' value='0' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_nil_index_option_override
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(&quot;post[]&quot;, @post, :index =&gt; nil) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -440,14 +440,14 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[][secret]' type='hidden' value='0' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_nested_fields_for
-    _erbout = ''
+    @output_buffer = ''
     form_for(:post, @post) do |f|
       f.fields_for(:comment, @post) do |c|
-        _erbout.concat c.text_field(:title)
+        @output_buffer.concat c.text_field(:title)
       end
     end
 
@@ -455,16 +455,16 @@ class FormHelperTest &lt; ActionView::TestCase
                &quot;&lt;input name='post[comment][title]' size='30' type='text' id='post_comment_title' value='Hello World' /&gt;&quot; +
                &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for(:post, @post) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -473,16 +473,16 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_with_index
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for(&quot;post[]&quot;, @post) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -491,16 +491,16 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[123][secret]' checked='checked' type='checkbox' id='post_123_secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[123][secret]' type='hidden' value='0' /&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_with_nil_index_option_override
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for(&quot;post[]&quot;, @post, :index =&gt; nil) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -509,16 +509,16 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[][secret]' checked='checked' type='checkbox' id='post__secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[][secret]' type='hidden' value='0' /&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_with_index_option_override
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for(&quot;post[]&quot;, @post, :index =&gt; &quot;abc&quot;) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -527,15 +527,15 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[abc][secret]' checked='checked' type='checkbox' id='post_abc_secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[abc][secret]' type='hidden' value='0' /&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_without_object
-    _erbout = ''
+    @output_buffer = ''
     fields_for(:post) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -544,15 +544,15 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_with_only_object
-    _erbout = ''
+    @output_buffer = ''
     fields_for(@post) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -561,31 +561,31 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_object_with_bracketed_name
-    _erbout = ''
+    @output_buffer = ''
     fields_for(&quot;author[post]&quot;, @post) do |f|
-      _erbout.concat f.label(:title)
-      _erbout.concat f.text_field(:title)
+      @output_buffer.concat f.label(:title)
+      @output_buffer.concat f.text_field(:title)
     end
 
     assert_dom_equal &quot;&lt;label for=\&quot;author_post_title\&quot;&gt;Title&lt;/label&gt;&quot; +
     &quot;&lt;input name='author[post][title]' size='30' type='text' id='author_post_title' value='Hello World' /&gt;&quot;,
-      _erbout
+      @output_buffer
   end
 
   def test_fields_for_object_with_bracketed_name_and_index
-    _erbout = ''
+    @output_buffer = ''
     fields_for(&quot;author[post]&quot;, @post, :index =&gt; 1) do |f|
-      _erbout.concat f.label(:title)
-      _erbout.concat f.text_field(:title)
+      @output_buffer.concat f.label(:title)
+      @output_buffer.concat f.text_field(:title)
     end
 
     assert_dom_equal &quot;&lt;label for=\&quot;author_post_1_title\&quot;&gt;Title&lt;/label&gt;&quot; +
       &quot;&lt;input name='author[post][1][title]' size='30' type='text' id='author_post_1_title' value='Hello World' /&gt;&quot;,
-      _erbout
+      @output_buffer
   end
 
   def test_form_builder_does_not_have_form_for_method
@@ -593,14 +593,14 @@ class FormHelperTest &lt; ActionView::TestCase
   end
 
   def test_form_for_and_fields_for
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :html =&gt; { :id =&gt; 'create-post' }) do |post_form|
-      _erbout.concat post_form.text_field(:title)
-      _erbout.concat post_form.text_area(:body)
+      @output_buffer.concat post_form.text_field(:title)
+      @output_buffer.concat post_form.text_area(:body)
 
       fields_for(:parent_post, @post) do |parent_fields|
-        _erbout.concat parent_fields.check_box(:secret)
+        @output_buffer.concat parent_fields.check_box(:secret)
       end
     end
 
@@ -612,18 +612,18 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='parent_post[secret]' type='hidden' value='0' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_and_fields_for_with_object
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :html =&gt; { :id =&gt; 'create-post' }) do |post_form|
-      _erbout.concat post_form.text_field(:title)
-      _erbout.concat post_form.text_area(:body)
+      @output_buffer.concat post_form.text_field(:title)
+      @output_buffer.concat post_form.text_area(:body)
 
       post_form.fields_for(@comment) do |comment_fields|
-        _erbout.concat comment_fields.text_field(:name)
+        @output_buffer.concat comment_fields.text_field(:name)
       end
     end
 
@@ -634,7 +634,7 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[comment][name]' type='text' id='post_comment_name' value='new comment' size='30' /&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   class LabelledFormBuilder &lt; ActionView::Helpers::FormBuilder
@@ -649,12 +649,12 @@ class FormHelperTest &lt; ActionView::TestCase
   end
 
   def test_form_for_with_labelled_builder
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :builder =&gt; LabelledFormBuilder) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -665,18 +665,18 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&lt;br/&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_default_form_builder
     old_default_form_builder, ActionView::Base.default_form_builder =
       ActionView::Base.default_form_builder, LabelledFormBuilder
 
-    _erbout = ''
+    @output_buffer = ''
     form_for(:post, @post) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -687,17 +687,17 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&lt;br/&gt;&quot; +
       &quot;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   ensure
     ActionView::Base.default_form_builder = old_default_form_builder
   end
 
   def test_default_form_builder_with_active_record_helpers
 
-    _erbout = ''
+    @output_buffer = ''
     form_for(:post, @post) do |f|
-       _erbout.concat f.error_message_on('author_name')
-       _erbout.concat f.error_messages
+       @output_buffer.concat f.error_message_on('author_name')
+       @output_buffer.concat f.error_messages
     end
 
     expected = %(&lt;form action='http://www.example.com' method='post'&gt;) +
@@ -705,7 +705,7 @@ class FormHelperTest &lt; ActionView::TestCase
                %(&lt;div class=&quot;errorExplanation&quot; id=&quot;errorExplanation&quot;&gt;&lt;h2&gt;1 error prohibited this post from being saved&lt;/h2&gt;&lt;p&gt;There were problems with the following fields:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Author name can't be empty&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;) +
                %(&lt;/form&gt;)
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
 
   end
 
@@ -713,10 +713,10 @@ class FormHelperTest &lt; ActionView::TestCase
     post = @post
     @post = nil
 
-    _erbout = ''
+    @output_buffer = ''
     form_for(:post, post) do |f|
-       _erbout.concat f.error_message_on('author_name')
-       _erbout.concat f.error_messages
+       @output_buffer.concat f.error_message_on('author_name')
+       @output_buffer.concat f.error_messages
     end
 
     expected = %(&lt;form action='http://www.example.com' method='post'&gt;) +
@@ -724,19 +724,19 @@ class FormHelperTest &lt; ActionView::TestCase
                %(&lt;div class=&quot;errorExplanation&quot; id=&quot;errorExplanation&quot;&gt;&lt;h2&gt;1 error prohibited this post from being saved&lt;/h2&gt;&lt;p&gt;There were problems with the following fields:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Author name can't be empty&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;) +
                %(&lt;/form&gt;)
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
 
   end
 
   # Perhaps this test should be moved to prototype helper tests.
   def test_remote_form_for_with_labelled_builder
     self.extend ActionView::Helpers::PrototypeHelper
-     _erbout = ''
+     @output_buffer = ''
 
      remote_form_for(:post, @post, :builder =&gt; LabelledFormBuilder) do |f|
-       _erbout.concat f.text_field(:title)
-       _erbout.concat f.text_area(:body)
-       _erbout.concat f.check_box(:secret)
+       @output_buffer.concat f.text_field(:title)
+       @output_buffer.concat f.text_area(:body)
+       @output_buffer.concat f.check_box(:secret)
      end
 
      expected =
@@ -747,16 +747,16 @@ class FormHelperTest &lt; ActionView::TestCase
        &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&lt;br/&gt;&quot; +
        &quot;&lt;/form&gt;&quot;
 
-     assert_dom_equal expected, _erbout
+     assert_dom_equal expected, @output_buffer
   end
 
   def test_fields_for_with_labelled_builder
-    _erbout = ''
+    @output_buffer = ''
 
     fields_for(:post, @post, :builder =&gt; LabelledFormBuilder) do |f|
-      _erbout.concat f.text_field(:title)
-      _erbout.concat f.text_area(:body)
-      _erbout.concat f.check_box(:secret)
+      @output_buffer.concat f.text_field(:title)
+      @output_buffer.concat f.text_area(:body)
+      @output_buffer.concat f.check_box(:secret)
     end
 
     expected =
@@ -765,28 +765,28 @@ class FormHelperTest &lt; ActionView::TestCase
       &quot;&lt;label for='secret'&gt;Secret:&lt;/label&gt; &lt;input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' /&gt;&quot; +
       &quot;&lt;input name='post[secret]' type='hidden' value='0' /&gt;&lt;br/&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_html_options_adds_options_to_form_tag
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :html =&gt; {:id =&gt; 'some_form', :class =&gt; 'some_class'}) do |f| end
     expected = &quot;&lt;form action=\&quot;http://www.example.com\&quot; class=\&quot;some_class\&quot; id=\&quot;some_form\&quot; method=\&quot;post\&quot;&gt;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_string_url_option
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :url =&gt; 'http://www.otherdomain.com') do |f| end
 
-    assert_equal '&lt;form action=&quot;http://www.otherdomain.com&quot; method=&quot;post&quot;&gt;&lt;/form&gt;', _erbout
+    assert_equal '&lt;form action=&quot;http://www.otherdomain.com&quot; method=&quot;post&quot;&gt;&lt;/form&gt;', @output_buffer
   end
 
   def test_form_for_with_hash_url_option
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :url =&gt; {:controller =&gt; 'controller', :action =&gt; 'action'}) do |f| end
 
@@ -795,25 +795,25 @@ class FormHelperTest &lt; ActionView::TestCase
   end
 
   def test_form_for_with_record_url_option
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(:post, @post, :url =&gt; @post) do |f| end
 
     expected = &quot;&lt;form action=\&quot;/posts/123\&quot; method=\&quot;post\&quot;&gt;&lt;/form&gt;&quot;
-    assert_equal expected, _erbout
+    assert_equal expected, @output_buffer
   end
 
   def test_form_for_with_existing_object
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(@post) do |f| end
 
     expected = &quot;&lt;form action=\&quot;/posts/123\&quot; class=\&quot;edit_post\&quot; id=\&quot;edit_post_123\&quot; method=\&quot;post\&quot;&gt;&lt;div style=\&quot;margin:0;padding:0\&quot;&gt;&lt;input name=\&quot;_method\&quot; type=\&quot;hidden\&quot; value=\&quot;put\&quot; /&gt;&lt;/div&gt;&lt;/form&gt;&quot;
-    assert_equal expected, _erbout
+    assert_equal expected, @output_buffer
   end
 
   def test_form_for_with_new_object
-    _erbout = ''
+    @output_buffer = ''
 
     post = Post.new
     post.new_record = true
@@ -822,64 +822,64 @@ class FormHelperTest &lt; ActionView::TestCase
     form_for(post) do |f| end
 
     expected = &quot;&lt;form action=\&quot;/posts\&quot; class=\&quot;new_post\&quot; id=\&quot;new_post\&quot; method=\&quot;post\&quot;&gt;&lt;/form&gt;&quot;
-    assert_equal expected, _erbout
+    assert_equal expected, @output_buffer
   end
 
   def test_form_for_with_existing_object_in_list
     @post.new_record = false
     @comment.save
-    _erbout = ''
+    @output_buffer = ''
     form_for([@post, @comment]) {}
 
     expected = %(&lt;form action=&quot;#{comment_path(@post, @comment)}&quot; class=&quot;edit_comment&quot; id=&quot;edit_comment_1&quot; method=&quot;post&quot;&gt;&lt;div style=&quot;margin:0;padding:0&quot;&gt;&lt;input name=&quot;_method&quot; type=&quot;hidden&quot; value=&quot;put&quot; /&gt;&lt;/div&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_new_object_in_list
     @post.new_record = false
-    _erbout = ''
+    @output_buffer = ''
     form_for([@post, @comment]) {}
 
     expected = %(&lt;form action=&quot;#{comments_path(@post)}&quot; class=&quot;new_comment&quot; id=&quot;new_comment&quot; method=&quot;post&quot;&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_existing_object_and_namespace_in_list
     @post.new_record = false
     @comment.save
-    _erbout = ''
+    @output_buffer = ''
     form_for([:admin, @post, @comment]) {}
 
     expected = %(&lt;form action=&quot;#{admin_comment_path(@post, @comment)}&quot; class=&quot;edit_comment&quot; id=&quot;edit_comment_1&quot; method=&quot;post&quot;&gt;&lt;div style=&quot;margin:0;padding:0&quot;&gt;&lt;input name=&quot;_method&quot; type=&quot;hidden&quot; value=&quot;put&quot; /&gt;&lt;/div&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_new_object_and_namespace_in_list
     @post.new_record = false
-    _erbout = ''
+    @output_buffer = ''
     form_for([:admin, @post, @comment]) {}
 
     expected = %(&lt;form action=&quot;#{admin_comments_path(@post)}&quot; class=&quot;new_comment&quot; id=&quot;new_comment&quot; method=&quot;post&quot;&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_for_with_existing_object_and_custom_url
-    _erbout = ''
+    @output_buffer = ''
 
     form_for(@post, :url =&gt; &quot;/super_posts&quot;) do |f| end
 
     expected = &quot;&lt;form action=\&quot;/super_posts\&quot; class=\&quot;edit_post\&quot; id=\&quot;edit_post_123\&quot; method=\&quot;post\&quot;&gt;&lt;div style=\&quot;margin:0;padding:0\&quot;&gt;&lt;input name=\&quot;_method\&quot; type=\&quot;hidden\&quot; value=\&quot;put\&quot; /&gt;&lt;/div&gt;&lt;/form&gt;&quot;
-    assert_equal expected, _erbout
+    assert_equal expected, @output_buffer
   end
 
   def test_remote_form_for_with_html_options_adds_options_to_form_tag
     self.extend ActionView::Helpers::PrototypeHelper
-    _erbout = ''
+    @output_buffer = ''
 
     remote_form_for(:post, @post, :html =&gt; {:id =&gt; 'some_form', :class =&gt; 'some_class'}) do |f| end
     expected = &quot;&lt;form action=\&quot;http://www.example.com\&quot; class=\&quot;some_class\&quot; id=\&quot;some_form\&quot; method=\&quot;post\&quot; onsubmit=\&quot;new Ajax.Request('http://www.example.com', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\&quot;&gt;&lt;/form&gt;&quot;
 
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
 </diff>
      <filename>actionpack/test/template/form_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -231,15 +231,15 @@ class FormOptionsHelperTest &lt; ActionView::TestCase
     @post = Post.new
     @post.category = &quot;&lt;mus&gt;&quot;
     
-    _erbout = ''
+    @output_buffer = ''
     
     fields_for :post, @post do |f|
-      _erbout.concat f.select(:category, %w( abe &lt;mus&gt; hest))
+      @output_buffer.concat f.select(:category, %w( abe &lt;mus&gt; hest))
     end
     
     assert_dom_equal(
       &quot;&lt;select id=\&quot;post_category\&quot; name=\&quot;post[category]\&quot;&gt;&lt;option value=\&quot;abe\&quot;&gt;abe&lt;/option&gt;\n&lt;option value=\&quot;&amp;lt;mus&amp;gt;\&quot; selected=\&quot;selected\&quot;&gt;&amp;lt;mus&amp;gt;&lt;/option&gt;\n&lt;option value=\&quot;hest\&quot;&gt;hest&lt;/option&gt;&lt;/select&gt;&quot;,
-      _erbout
+      @output_buffer
     )
   end
 
@@ -353,15 +353,15 @@ class FormOptionsHelperTest &lt; ActionView::TestCase
     @post = Post.new
     @post.author_name = &quot;Babe&quot;
     
-    _erbout = ''
+    @output_buffer = ''
     
     fields_for :post, @post do |f|
-      _erbout.concat f.collection_select(:author_name, @posts, :author_name, :author_name)
+      @output_buffer.concat f.collection_select(:author_name, @posts, :author_name, :author_name)
     end
     
     assert_dom_equal(
       &quot;&lt;select id=\&quot;post_author_name\&quot; name=\&quot;post[author_name]\&quot;&gt;&lt;option value=\&quot;&amp;lt;Abe&amp;gt;\&quot;&gt;&amp;lt;Abe&amp;gt;&lt;/option&gt;\n&lt;option value=\&quot;Babe\&quot; selected=\&quot;selected\&quot;&gt;Babe&lt;/option&gt;\n&lt;option value=\&quot;Cabe\&quot;&gt;Cabe&lt;/option&gt;&lt;/select&gt;&quot;,
-      _erbout
+      @output_buffer
     )
   end
 
@@ -1195,10 +1195,10 @@ COUNTRIES
   def test_time_zone_select_under_fields_for
     @firm = Firm.new(&quot;D&quot;)
     
-    _erbout = ''
+    @output_buffer = ''
     
     fields_for :firm, @firm do |f|
-      _erbout.concat f.time_zone_select(:time_zone)
+      @output_buffer.concat f.time_zone_select(:time_zone)
     end
     
     assert_dom_equal(
@@ -1209,7 +1209,7 @@ COUNTRIES
       &quot;&lt;option value=\&quot;D\&quot; selected=\&quot;selected\&quot;&gt;D&lt;/option&gt;\n&quot; +
       &quot;&lt;option value=\&quot;E\&quot;&gt;E&lt;/option&gt;&quot; +
       &quot;&lt;/select&gt;&quot;,
-      _erbout
+      @output_buffer
     )
   end
 </diff>
      <filename>actionpack/test/template/form_options_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,19 +43,19 @@ class FormTagHelperTest &lt; ActionView::TestCase
   end
 
   def test_form_tag_with_block
-    _erbout = ''
-    form_tag(&quot;http://example.com&quot;) { _erbout.concat &quot;Hello world!&quot; }
+    @output_buffer = ''
+    form_tag(&quot;http://example.com&quot;) { @output_buffer.concat &quot;Hello world!&quot; }
 
     expected = %(&lt;form action=&quot;http://example.com&quot; method=&quot;post&quot;&gt;Hello world!&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_form_tag_with_block_and_method
-    _erbout = ''
-    form_tag(&quot;http://example.com&quot;, :method =&gt; :put) { _erbout.concat &quot;Hello world!&quot; }
+    @output_buffer = ''
+    form_tag(&quot;http://example.com&quot;, :method =&gt; :put) { @output_buffer.concat &quot;Hello world!&quot; }
 
     expected = %(&lt;form action=&quot;http://example.com&quot; method=&quot;post&quot;&gt;&lt;div style='margin:0;padding:0'&gt;&lt;input type=&quot;hidden&quot; name=&quot;_method&quot; value=&quot;put&quot; /&gt;&lt;/div&gt;Hello world!&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_hidden_field_tag
@@ -234,23 +234,23 @@ class FormTagHelperTest &lt; ActionView::TestCase
   end
 
   def test_field_set_tag
-    _erbout = ''
-    field_set_tag(&quot;Your details&quot;) { _erbout.concat &quot;Hello world!&quot; }
+    @output_buffer = ''
+    field_set_tag(&quot;Your details&quot;) { @output_buffer.concat &quot;Hello world!&quot; }
 
     expected = %(&lt;fieldset&gt;&lt;legend&gt;Your details&lt;/legend&gt;Hello world!&lt;/fieldset&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
 
-    _erbout = ''
-    field_set_tag { _erbout.concat &quot;Hello world!&quot; }
+    @output_buffer = ''
+    field_set_tag { @output_buffer.concat &quot;Hello world!&quot; }
 
     expected = %(&lt;fieldset&gt;Hello world!&lt;/fieldset&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
     
-    _erbout = ''
-    field_set_tag('') { _erbout.concat &quot;Hello world!&quot; }
+    @output_buffer = ''
+    field_set_tag('') { @output_buffer.concat &quot;Hello world!&quot; }
 
     expected = %(&lt;fieldset&gt;Hello world!&lt;/fieldset&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def protect_against_forgery?</diff>
      <filename>actionpack/test/template/form_tag_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -92,15 +92,15 @@ class JavaScriptHelperTest &lt; ActionView::TestCase
   end
 
   def test_javascript_tag_with_block
-    _erbout = ''
-    javascript_tag { _erbout.concat &quot;alert('hello')&quot; }
-    assert_dom_equal &quot;&lt;script type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nalert('hello')\n//]]&gt;\n&lt;/script&gt;&quot;, _erbout
+    @output_buffer = ''
+    javascript_tag { @output_buffer.concat &quot;alert('hello')&quot; }
+    assert_dom_equal &quot;&lt;script type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nalert('hello')\n//]]&gt;\n&lt;/script&gt;&quot;, @output_buffer
   end
 
   def test_javascript_tag_with_block_and_options
-    _erbout = ''
-    javascript_tag(:id =&gt; &quot;the_js_tag&quot;) { _erbout.concat &quot;alert('hello')&quot; }
-    assert_dom_equal &quot;&lt;script id=\&quot;the_js_tag\&quot; type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nalert('hello')\n//]]&gt;\n&lt;/script&gt;&quot;, _erbout
+    @output_buffer = ''
+    javascript_tag(:id =&gt; &quot;the_js_tag&quot;) { @output_buffer.concat &quot;alert('hello')&quot; }
+    assert_dom_equal &quot;&lt;script id=\&quot;the_js_tag\&quot; type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nalert('hello')\n//]]&gt;\n&lt;/script&gt;&quot;, @output_buffer
   end
 
   def test_javascript_cdata_section</diff>
      <filename>actionpack/test/template/javascript_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -118,52 +118,52 @@ class PrototypeHelperTest &lt; PrototypeHelperBaseTest
   end
 
   def test_form_remote_tag_with_block
-    _erbout = ''
-    form_remote_tag(:update =&gt; &quot;glass_of_beer&quot;, :url =&gt; { :action =&gt; :fast  }) { _erbout.concat &quot;Hello world!&quot; }
-    assert_dom_equal %(&lt;form action=\&quot;http://www.example.com/fast\&quot; method=\&quot;post\&quot; onsubmit=\&quot;new Ajax.Updater('glass_of_beer', 'http://www.example.com/fast', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\&quot;&gt;Hello world!&lt;/form&gt;), _erbout
+    @output_buffer = ''
+    form_remote_tag(:update =&gt; &quot;glass_of_beer&quot;, :url =&gt; { :action =&gt; :fast  }) { @output_buffer.concat &quot;Hello world!&quot; }
+    assert_dom_equal %(&lt;form action=\&quot;http://www.example.com/fast\&quot; method=\&quot;post\&quot; onsubmit=\&quot;new Ajax.Updater('glass_of_beer', 'http://www.example.com/fast', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\&quot;&gt;Hello world!&lt;/form&gt;), @output_buffer
   end
 
   def test_remote_form_for_with_record_identification_with_new_record
-    _erbout = ''
+    @output_buffer = ''
     remote_form_for(@record, {:html =&gt; { :id =&gt; 'create-author' }}) {}
     
     expected = %(&lt;form action='#{authors_path}' onsubmit=&quot;new Ajax.Request('#{authors_path}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;&quot; class='new_author' id='create-author' method='post'&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_remote_form_for_with_record_identification_without_html_options
-    _erbout = ''
+    @output_buffer = ''
     remote_form_for(@record) {}
     
     expected = %(&lt;form action='#{authors_path}' onsubmit=&quot;new Ajax.Request('#{authors_path}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;&quot; class='new_author' method='post' id='new_author'&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_remote_form_for_with_record_identification_with_existing_record
     @record.save
-    _erbout = ''
+    @output_buffer = ''
     remote_form_for(@record) {}
     
     expected = %(&lt;form action='#{author_path(@record)}' id='edit_author_1' method='post' onsubmit=&quot;new Ajax.Request('#{author_path(@record)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;&quot; class='edit_author'&gt;&lt;div style='margin:0;padding:0'&gt;&lt;input name='_method' type='hidden' value='put' /&gt;&lt;/div&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_remote_form_for_with_new_object_in_list
-    _erbout = ''
+    @output_buffer = ''
     remote_form_for([@author, @article]) {}
     
     expected = %(&lt;form action='#{author_articles_path(@author)}' onsubmit=&quot;new Ajax.Request('#{author_articles_path(@author)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;&quot; class='new_article' method='post' id='new_article'&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
   
   def test_remote_form_for_with_existing_object_in_list
     @author.save
     @article.save
-    _erbout = ''
+    @output_buffer = ''
     remote_form_for([@author, @article]) {}
     
     expected = %(&lt;form action='#{author_article_path(@author, @article)}' id='edit_article_1' method='post' onsubmit=&quot;new Ajax.Request('#{author_article_path(@author, @article)}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;&quot; class='edit_article'&gt;&lt;div style='margin:0;padding:0'&gt;&lt;input name='_method' type='hidden' value='put' /&gt;&lt;/div&gt;&lt;/form&gt;)
-    assert_dom_equal expected, _erbout
+    assert_dom_equal expected, @output_buffer
   end
 
   def test_on_callbacks</diff>
      <filename>actionpack/test/template/prototype_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,37 +17,37 @@ class RecordTagHelperTest &lt; ActionView::TestCase
   end
   
   def test_content_tag_for
-    _erbout = ''
+    @output_buffer = ''
     expected = %(&lt;li class=&quot;post bar&quot; id=&quot;post_45&quot;&gt;&lt;/li&gt;)
     actual = content_tag_for(:li, @post, :class =&gt; 'bar') { }
     assert_dom_equal expected, actual
   end
   
   def test_content_tag_for_prefix
-    _erbout = ''
+    @output_buffer = ''
     expected = %(&lt;ul class=&quot;post&quot; id=&quot;archived_post_45&quot;&gt;&lt;/ul&gt;)
     actual = content_tag_for(:ul, @post, :archived) { }
     assert_dom_equal expected, actual    
   end
   
   def test_content_tag_for_with_extra_html_tags
-    _erbout = ''
+    @output_buffer = ''
     expected = %(&lt;tr class=&quot;post bar&quot; id=&quot;post_45&quot; style='background-color: #f0f0f0'&gt;&lt;/tr&gt;)
     actual = content_tag_for(:tr, @post, {:class =&gt; &quot;bar&quot;, :style =&gt; &quot;background-color: #f0f0f0&quot;}) { }
     assert_dom_equal expected, actual        
   end
   
   def test_block_works_with_content_tag_for
-    _erbout = ''
+    @output_buffer = ''
     expected = %(&lt;tr class=&quot;post&quot; id=&quot;post_45&quot;&gt;#{@post.body}&lt;/tr&gt;)
-    actual = content_tag_for(:tr, @post) { _erbout.concat @post.body }
+    actual = content_tag_for(:tr, @post) { @output_buffer.concat @post.body }
     assert_dom_equal expected, actual            
   end
   
   def test_div_for    
-    _erbout = ''    
+    @output_buffer = ''
     expected = %(&lt;div class=&quot;post bar&quot; id=&quot;post_45&quot;&gt;#{@post.body}&lt;/div&gt;)
-    actual = div_for(@post, :class =&gt; &quot;bar&quot;) { _erbout.concat @post.body }
+    actual = div_for(@post, :class =&gt; &quot;bar&quot;) { @output_buffer.concat @post.body }
     assert_dom_equal expected, actual
   end  
   </diff>
      <filename>actionpack/test/template/record_tag_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,15 +35,15 @@ class TagHelperTest &lt; ActionView::TestCase
   end
   
   def test_content_tag_with_block
-    _erbout = ''
-    content_tag(:div) { _erbout.concat &quot;Hello world!&quot; }
-    assert_dom_equal &quot;&lt;div&gt;Hello world!&lt;/div&gt;&quot;, _erbout
+    @output_buffer = ''
+    content_tag(:div) { @output_buffer.concat &quot;Hello world!&quot; }
+    assert_dom_equal &quot;&lt;div&gt;Hello world!&lt;/div&gt;&quot;, @output_buffer
   end
   
   def test_content_tag_with_block_and_options
-    _erbout = ''
-    content_tag(:div, :class =&gt; &quot;green&quot;) { _erbout.concat &quot;Hello world!&quot; }
-    assert_dom_equal %(&lt;div class=&quot;green&quot;&gt;Hello world!&lt;/div&gt;), _erbout
+    @output_buffer = ''
+    content_tag(:div, :class =&gt; &quot;green&quot;) { @output_buffer.concat &quot;Hello world!&quot; }
+    assert_dom_equal %(&lt;div class=&quot;green&quot;&gt;Hello world!&lt;/div&gt;), @output_buffer
   end
   
   def test_content_tag_with_block_and_options_outside_of_action_view</diff>
      <filename>actionpack/test/template/tag_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>933697a5fc5f4c56c4fd7fbbd31b8973df9c1054</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy Kemper</name>
    <login>jeremy</login>
    <email>jeremy@bitsweat.net</email>
  </author>
  <url>http://github.com/rails/rails/commit/0bdb7d353b4ac6f5470884360f9a480a16bd709c</url>
  <id>0bdb7d353b4ac6f5470884360f9a480a16bd709c</id>
  <committed-date>2008-06-02T21:32:50-07:00</committed-date>
  <authored-date>2008-06-02T13:32:58-07:00</authored-date>
  <message>Work with @output_buffer instead of _erbout</message>
  <tree>53d266015cf696c280b9ba37995c9d1f6bd02358</tree>
  <committer>
    <name>Jeremy Kemper</name>
    <login>jeremy</login>
    <email>jeremy@bitsweat.net</email>
  </committer>
</commit>
