rack/rack — pull request #411 by jamie (2012-07-19 19:54:17+00:00)
Title: Handle existing rack.session where the app modifies session vars

ID#prepare_session calls merge! on the newly-created SessionHash, but this method is not overridden to parse existing data. As such, if the app modifies session values, it winds up discarding the entire previous session.

I saw there was already a spec for a non-session-modifying app which ran fine, but failed exactly like I was experiencing when I used the example incrementing app.

For me, this was breaking Rack::Test while testing a Sinatra app.