Skip to content
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

Version 1.9.2 breaks passing an object as a parameter to the expire method #361

Open
opensourceame opened this issue May 30, 2023 · 0 comments

Comments

@opensourceame
Copy link

Version 1.9.2 breaks passing an object as a parameter for the expire time

in 1.9.0 this works:

r = Redis.new
r.set(:a, 1)
r.expire(:a, 1.hour) # ActiveSupport::Duration object

in 1.9.2 it's broken:

r = Redis.new
r.set(:a, 1)
r.expire(:a, 1.hour) # ActiveSupport::Duration object

TypeError: Unsupported command argument type: ActiveSupport::Duration

IMO expire should cast to integer if the object responds to to_i.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant