Closed archey closed 9 years ago
This is a Ruby 2.2.x compatibility issue, we might want to track this under a new label.
It looks like Ruby's behavior here is to throw a warning if the same key with the same value is set on the same hash. The modules/auxiliary/scanner/http/http_login.rb
issue is due to an empty References
array, which is a "duplicate" of the parent hashes default value. The lib/rex/proto/http/server.rb
issue is just a duplicate line in a hash initializer (likely a bad merge).
This is all due to the fix at https://bugs.ruby-lang.org/issues/10315 . I was trying to come up with a reason to ignore these 2.2 warnings, but I am foiled. According to https://www.ruby-lang.org/en/downloads/ , current stable is 2.2, previous stable is 2.1. I still think it's a little premature to call 2.2 "stable" since it was just released on Dec 25, 2014, but there it is.
There are loads of projects running into this problem. Seems like a good idea not to duplicate hash keys. Example:
foo_hash = {
foo: 1,
bar: 2,
bar: 3,
baz: 4
}
puts foo_hash.inspect
Causes the warning on 2.2, not on 2.1.
At any rate, if we're going to start fixing things for 2.2, which I suppose we should given the production-ready(?) status of 2.2.0, we ought to add 2.2 testing to Travis-CI once these and other errors and warnings are cleared. Maybe pop up a branch like we have for staging/rails-4.0? Otherwise we're just fixing things in the dark.
This is a Ruby 2.2.x compatibility issue, we might want to track this under a new label.
Since we're going to treat 2.2 and 2.1 the same, may as well have one label. That label list is getting a little long anyway, and too much labelling is going to make my eyeballs hurt.
/cc @bcook-r7 who's working on @wvu-r7's fix at #4832 now
Ah, thanks. Let me retest with ruby2.2 real quick.
ruby version ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
These dont seem to affect creating handlers or using payloads, I believe this would just affect the above mentioned modules.