lib/memcache.rb in memcache-client-1.2.0 vs lib/memcache.rb in memcache-client-1.2.1

- old
+ new

@@ -37,10 +37,15 @@ # does not attempt to be complete implementation of the entire API. class MemCache ## + # The version of MemCache you are using. + + VERSION = '1.2.1' + + ## # Default options for the cache object. DEFAULT_OPTIONS = { :namespace => nil, :readonly => false, @@ -107,12 +112,12 @@ opts = DEFAULT_OPTIONS.merge opts @namespace = opts[:namespace] @readonly = opts[:readonly] @multithread = opts[:multithread] @mutex = Mutex.new if @multithread - self.servers = servers @buckets = [] + self.servers = servers end ## # Return a string representation of the cache object. @@ -153,11 +158,10 @@ if server.memcache.multithread != @multithread then raise ArgumentError, "can't mix threaded and non-threaded servers" end server else - raise TypeError, "Cannot convert %s to MemCache::Server" % - svr.class.name + raise TypeError, "cannot convert #{server.class} into MemCache::Server" end end # Create an array of server buckets for weight selection of servers. @buckets = []