redis/redis-rb — pull request #330 by hornairs (2013-03-27 18:16:05+00:00)
Title: Make Futures identifiable

I want code who gets given a value from Redis to be able to know if it need to call `value` or not on the thing to get the real value. This defines `is_a?(other_class)` method on `Future` so that calling code can figure out if it is a Future or not. Other ways I considered doing this:

- adding a `redis_future?` predicate method to the object, but I figure existing Ruby paradigms exist for asking objects what they are, so it makes more sense to just use the usual Ruby way.
- changing the superclass of `Future` to `Object` instead of `BasicObject`, but there is a test which assets `Future` doesn't respond to `to_s`, which `Object` definitely does. Is the superclass `BasicObject` because its easy to get confused if a value is a future or not and developers often call methods like `to_s` on futures by accident? Or is it for performance?

Thoughts? Thanks for any and all feedback!