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

Already on GitHub? Sign in to your account

Tests fail in all newly released versions, including 1.4.0 #297

Closed
graaff opened this Issue Dec 29, 2011 · 4 comments

Comments

Projects
None yet
3 participants

graaff commented Dec 29, 2011

I'm getting test failures for all the newly released rack version with ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]. For 1.4.0 they look like this:

Bacon::Error: "barfoofoo".==("foobarfoo") failed
    ./test/spec_response.rb:154: Rack::Response - has a useful constructor
    ./test/spec_response.rb:139
    ./test/spec_response.rb:5

Bacon::Error: "bar=2&foo=1".==("foo=1&bar=2") failed
    ./test/spec_utils.rb:193: Rack::Utils - should build query strings correctly
    ./test/spec_utils.rb:189
    ./test/spec_utils.rb:5

Bacon::Error: "bar=2&foo=1".==("foo=1&bar=2") failed
    ./test/spec_utils.rb:204: Rack::Utils - should build nested query strings correctly
    ./test/spec_utils.rb:199
    ./test/spec_utils.rb:5

The same tests fail also for the older versions. Looks like a hash-ordering assumption that only works on 1.9, perhaps triggered by the security fix?

graaff commented Dec 29, 2011

A bit of digging reveals that these failures are "caused" by the new p357 version of ruby 1.8. All tests pass with p352 which was the previous release.

Contributor

hannesg commented Dec 29, 2011

I think so. The mentioned tests seems to depent on the key order in a hash. The security patch randomizes the order. I guess a lot of libraries will suffer this problem.

Contributor

hannesg commented Dec 29, 2011

Fixed it: #22

Owner

raggi commented Jan 7, 2012

PR merged, thanks

@raggi raggi closed this Jan 7, 2012

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