Skip to content

Counter increment and decrement return value #62

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

Closed
pbstriker38 opened this issue Jan 21, 2022 · 1 comment · Fixed by #72
Closed

Counter increment and decrement return value #62

pbstriker38 opened this issue Jan 21, 2022 · 1 comment · Fixed by #72

Comments

@pbstriker38
Copy link
Contributor

Current return value

irb(main):001:0> counter = Kredis.counter('my_counter', expires_in: 1.hour)
irb(main):002:0> counter.increment
=> [true, 1]
irb(main):003:0> counter.decrement
=> [false, 0]

expected return value

irb(main):001:0> counter = Kredis.counter('my_counter', expires_in: 1.hour)
irb(main):002:0> counter.increment
=> 1
irb(main):003:0> counter.decrement
=> 0

I can open a pull request if this is an acceptable change.

@dhh
Copy link
Member

dhh commented Feb 19, 2022

Yes please!

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

Successfully merging a pull request may close this issue.

2 participants