nateware/redis-objects — pull request #78 by ajlai (2012-12-14 03:20:21+00:00)
Title: Fix counter rewinding with nondefault by value

Addresses #36

Description:
* When a nondefault `by` is used for counter increment/decrement with blocks, the rewind doesn't work correcly.

Example:
```irb
irb(main):001:0> require 'redis/counter'
=> true
irb(main):002:0> r = Redis::Counter.new(:foo)
=> #
irb(main):003:0> r.reset(5)
=> true
irb(main):004:0> r.increment(5) { nil }
=> nil
irb(main):005:0> r.value
=> 9
irb(main):006:0> "that should be 5..."
```

Changes:
* fixes the issue for `increment`/`decrement` as well as `increment_counter`/`decrement_counter` by passing `by` to `rewindable_block`
* Adds test cases for the methods above with a nondefault `by`

Thanks for looking over this!