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
Add double splat operator for ruby 3.0.1 support #173
Add double splat operator for ruby 3.0.1 support #173
Conversation
4a2d7b0
to
1ec46bb
Compare
1ec46bb
to
d52ac4c
Compare
Well I was going to test this but I'm having trouble getting Metasploit to start with Ruby 3.0.0 as installed from RVM. I had to remove pcaprub-0.13.0 because that "requires ruby version ~> 2.0", after which I got the stack trace referenced below. msfconsole Stack Trace
I see the unit tests pass when run by the automation, but I can't seem to reproduce that either. For what it's worth, it looks like the same tests are failing on both master and this PR branch when run with Ruby 3.0.0, however, when I run the tests from both branches with Ruby 2.7.2, there are no errors. Is that expected at this time? Do you have any more details that might help with testing this? |
Apologies, I thought you meant in isolation you tried the ruby_smb tests with Ruby 3.0.0. If you want to test change fixes metasploit console to work you'll need:
|
Note ruby_smb doesn't work with 3.0.0, only 3.0.1 due to a bug in Ruby's hash implementation which causes a bug in the bindata library |
Thanks alot, those steps did the trick. Using Ruby 3.0.1 this time I was able to reproduce the original issue without these changes as well as confirm that the changes fix it. I was also able to run the unit tests and confirm that they all pass. I'll get this merged in shortly, thanks @adfoster-r7 ! |
Fixes a Ruby 3.0.1 issue for metasploit console when attempting to enumerate shares:
This code path was being exercised within the rspec test suite, however, they're wrapped in rspec 'expect(...).to receive(opts)` - so they were passing, when they shouldn't have been.
Article:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
I tested framework and ruby_smb together by updating the gemfile to point to my local directory and rerunning
bundle