Skip to content

Commit 0dafeab

Browse files
committed
Update example of generated code
1 parent 4a11198 commit 0dafeab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/dry/core/memoizable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def #{method.name} # def slow_fetch
9595

9696
m = module_eval(<<~RUBY, __FILE__, __LINE__ + 1)
9797
def #{method.name}(#{params.join(", ")}) # def slow_calc(arg1, arg2, arg3)
98-
key = [:"#{method.name}", #{binds.join(", ")}].hash # [:slow_calc, arg1, arg2, arg3].hash
98+
key = [:"#{method.name}", #{binds.join(", ")}].hash # key = [:slow_calc, arg1, arg2, arg3].hash
9999
#
100100
if @__memoized__.key?(key) # if @__memoized__.key?(key)
101101
@__memoized__[key] # @__memoized__[key]

0 commit comments

Comments
 (0)