-
Notifications
You must be signed in to change notification settings - Fork 157
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 keyword arguments and stream specs #199
Conversation
Thank you! |
This patch seem to be causing issues in ruby 2.6 I believe you had to add |
@pyromaniac I did update the Gemfile: https://github.com/sds/mock_redis/blob/master/Gemfile#L12 Hmm but not the gemspec: https://github.com/sds/mock_redis/blob/master/mock_redis.gemspec.#199. I think we need this in the gemspec:
|
Yeah, that's what I meant, sorry :) |
@sds can you add |
Oh well, thanks for releasing it with the runtime dep but apparently this is not enough, it still fails. I believe this is because you also need to |
id = @redises.xadd(@key, key: 'value') | ||
expect(@redises.xadd(@key, key: 'value')).to match(/#{t}\d{3}-0/) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonatball This doesn't cause spec failures for you? Inserting the extra xadd call causes the subsequent xadd to return .........-1
rather than .........-0
for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was maybe lucky that my machine is slow? I can see how that could happen. I'm not sure why that line got there actually. I recently did another PR and ran all the tests successfully. Probably should either delete that line or change to expect(id).
Ruby 3.0 handles keyword arguments differently: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
This attempts to fix that issue. Note there are still two warnings that I'm not sure how to fix in redis_multiplexer.rb method_missing.