Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for branch 3-2-stable - return the same session hash object #5597

Merged
merged 1 commit into from
Mar 26, 2012

Conversation

carlosantoniodasilva
Copy link
Member

This is an attempt to fix the build for branch 3-2-stable. It's currently green on travis by chance, due to randomly errors happening on Ruby 1.8.7 p538.

Branch 3-1 on travis actually showed up the error related to cookie store tests.

The idea behind this is to ensure the session hash that will be used to set the cookie value by rack shouldn't change, whereas right now it returns a new hash object every time set_session is called. With the random hash change in Ruby 1.8.7, it was causing the failures when testing against the generated Set-Cookie header.

Given this is applied and 3-2 tests pass, I'll send to 3-1 as well - and I think the same patch could be applied later to master as it makes sense to not return a different object.

/cc @josevalim @spastorino

Make sure to return the same hash object instead of returning a new one.
Returning a new one causes failures on cookie store tests, where it
tests for the 'Set-Cookie' header with the session signature.

This is due to the hash ordering changes on Ruby 1.8.7-p358.
josevalim added a commit that referenced this pull request Mar 26, 2012
Fix build for branch 3-2-stable - return the same session hash object
@josevalim josevalim merged commit 0e916ae into rails:3-2-stable Mar 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants