Fragment caching needs to operate on the pure output, not the safebuffer. #1539

Merged
merged 1 commit into from Jun 8, 2011

Conversation

Projects
None yet
3 participants
@cmeiklejohn
Contributor

cmeiklejohn commented Jun 8, 2011

Fix for #1537.

Ensure that we can operate directly on the output buffer, and not the safe buffer as it prevents certain operations.

Let me know if there's a more elegant way to approach this, or if there's something you'd like to see changed. This addresses test failures on 3.0.8 and master in actionpack/test/controller/caching_test.rb.

tenderlove added a commit that referenced this pull request Jun 8, 2011

Merge pull request #1539 from cmeiklejohn/fix_safe_buffer_in_fragment…
…_caching

Fragment caching needs to operate on the pure output, not the safebuffer.

@tenderlove tenderlove merged commit 80edbad into rails:master Jun 8, 2011

@arunagw

This comment has been minimized.

Show comment Hide comment
@arunagw

arunagw Jun 8, 2011

Member

@cmeiklejohn Can you send a pull request for 3-0-stable. I think this required also.

I ran this with 3-0-stable and getting one test fail

  1) Failure:
test_xml_formatted_fragment_caching(FunctionalFragmentCachingTest)
    [test/controller/caching_test.rb:783:in `test_xml_formatted_fragment_caching'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/callbacks.rb:434:in `_run_setup_callbacks'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run']:
<"\n  

Builder

\n\n"> expected but was <"\n\n">.
Member

arunagw commented Jun 8, 2011

@cmeiklejohn Can you send a pull request for 3-0-stable. I think this required also.

I ran this with 3-0-stable and getting one test fail

  1) Failure:
test_xml_formatted_fragment_caching(FunctionalFragmentCachingTest)
    [test/controller/caching_test.rb:783:in `test_xml_formatted_fragment_caching'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/callbacks.rb:434:in `_run_setup_callbacks'
     /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run']:
<"\n  

Builder

\n\n"> expected but was <"\n\n">.
@cmeiklejohn

This comment has been minimized.

Show comment Hide comment
@cmeiklejohn

cmeiklejohn Jun 8, 2011

Contributor

No, I think this is a separate issue with test_xml_formatted_fragment_caching. I'm looking at it now.

Contributor

cmeiklejohn commented Jun 8, 2011

No, I think this is a separate issue with test_xml_formatted_fragment_caching. I'm looking at it now.

@arunagw

This comment has been minimized.

Show comment Hide comment
@arunagw

arunagw Jun 8, 2011

Member

Thanks. I was cheery-picking your changes in 3-0-stable but got conflicts. So may be you can open a pull request with full changes :-)

Member

arunagw commented Jun 8, 2011

Thanks. I was cheery-picking your changes in 3-0-stable but got conflicts. So may be you can open a pull request with full changes :-)

@cmeiklejohn

This comment has been minimized.

Show comment Hide comment
@cmeiklejohn

cmeiklejohn Jun 8, 2011

Contributor

Will do.

Contributor

cmeiklejohn commented Jun 8, 2011

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment