active_memoize 1.0.0 → 1.0.1
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 +1 -1
- data/lib/active_memoize/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 015016fd4836bee8c837390c05995b41418300e6f7e01969f01edf6a84b37c67
|
4
|
+
data.tar.gz: ba742c8d1b57bd933802e43116abad77852d09a67107ee131d9f14f9b7ec2f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b4e94ab818fa3ef706ed242b6040acc2b9a36547e802f2c42bb7e43238114227e9daf50d26c26086f174cc9485bc14c28527ba355f8af0e04f9e5e6fc397fce
|
7
|
+
data.tar.gz: 7636d0d034229521857339f49060a364df6eefdc57c46efc409123478912177f2223a750dd48b5047468fdfbdd132f787f19f75d4d707fe69eaf761ea9190162
|
data/lib/active_memoize/cache.rb
CHANGED
@@ -54,7 +54,7 @@ module ActiveMemoize
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def memoize(&block)
|
57
|
-
method_name =
|
57
|
+
method_name = [caller_method, caller_locals(block)].compact.join(':')
|
58
58
|
return @cache[method_name] if @cache.key?(method_name)
|
59
59
|
|
60
60
|
@cache[method_name] = yield(block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_memoize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.0.
|
142
|
+
rubygems_version: 3.0.3
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Gem for using a cache and memoization system.
|