lib/nanoc/base/memoization.rb in nanoc-3.7.3 vs lib/nanoc/base/memoization.rb in nanoc-3.7.4
- old
+ new
@@ -50,10 +50,10 @@
# Get cache
@__memoization_cache ||= {}
@__memoization_cache[method_name] ||= {}
# Recalculate if necessary
- if !@__memoization_cache[method_name].key?(args)
+ unless @__memoization_cache[method_name].key?(args)
result = send(original_method_name, *args)
@__memoization_cache[method_name][args] = result
end
# Done