active_memoize 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_memoize/cache.rb +2 -0
- data/lib/active_memoize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425d8890f016d16f38c83696cbaea31b94464e8ba4ad342d9269105c13088ce6
|
4
|
+
data.tar.gz: 3f3811292ef795f16bb98e97f08808da42bf3609e576aa28f98ef0211d580fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a30a94212503902063d674fd76c1b553db9d4ddaa565b515c567cc48557cef149e886eb7d1688250adfa043bcffbc2daec8c86566475dca60c5174e8e5e392a5
|
7
|
+
data.tar.gz: c7acaedbddbec2d474ca41281512cf044e62639c1d044416b67ccf2a49cf217986be6eb654f48a6e039e024c3ab0841480b808a243598c1e1834a4f3172d4ac4
|
data/lib/active_memoize/cache.rb
CHANGED
@@ -87,6 +87,8 @@ module ActiveMemoize
|
|
87
87
|
def caller_locals(block)
|
88
88
|
local_vars = block.binding.local_variables
|
89
89
|
local_vars = local_vars.flat_map { |name| [name, block.binding.local_variable_get(name)].join('=') }
|
90
|
+
return if local_vars.empty?
|
91
|
+
|
90
92
|
local_vars.join(',')
|
91
93
|
end
|
92
94
|
# rubocop:enable Metrics/LineLength
|