ejfinneran / ratelimit

A Redis-backed rate limiter written in Ruby
MIT License
257 stars 55 forks source link

Silently fails when the bucket_count < 3 #15

Closed jdly closed 10 years ago

jdly commented 10 years ago

In the add function, the next 2 buckets are deleted so when there are < 3 buckets, add does nothing since the bucket that was added to is immediately deleted.

The initialize function should probably check for this condition and raise the appropriate error.

ejfinneran commented 10 years ago

Fix released in 1.0.2.

https://github.com/ejfinneran/ratelimit/releases/tag/v1.0.2