lib/redis/base_object.rb in redis-objects-0.5.0 vs lib/redis/base_object.rb in redis-objects-0.5.1
- old
+ new
@@ -2,11 +2,11 @@
# Defines base functionality for all redis-objects.
class BaseObject
def initialize(key, *args)
@key = key.is_a?(Array) ? key.flatten.join(':') : key
@options = args.last.is_a?(Hash) ? args.pop : {}
- @redis = args.first || $redis
+ @redis = args.first || $redis || Redis.current
end
-
+
alias :inspect :to_s # Ruby 1.9.2
end
end