lib/redis/base_object.rb in redis-objects-0.4.1 vs lib/redis/base_object.rb in redis-objects-0.5.0
- old
+ new
@@ -1,10 +1,12 @@
class Redis
# 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 : {} # ::Hash because of Redis::Hash
+ @options = args.last.is_a?(Hash) ? args.pop : {}
@redis = args.first || $redis
end
+
+ alias :inspect :to_s # Ruby 1.9.2
end
end