lib/moneta/proxy.rb in moneta-1.2.1 vs lib/moneta/proxy.rb in moneta-1.3.0
- old
+ new
@@ -20,10 +20,10 @@
# (see Defaults#each_key)
def each_key(&block)
raise NotImplementedError, "each_key is not supported on this proxy" \
unless supports? :each_key
- return enum_for(:each_key) unless block_given?
+ return enum_for(:each_key) { adapter.each_key.size } unless block_given?
adapter.each_key(&block)
self
end
# (see Defaults#increment)