tacky 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tacky.rb +7 -1
- data/tacky.gemspec +1 -1
- data/test/test_tacky.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40598eee1ed82e2e5006eecc35038a4bab02536fa749765e3d938ab79cb3d881
|
4
|
+
data.tar.gz: f5502a63ac7ed1c7f9930973c97ac10054e61e75a3597d7be57c0df61c662739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd4948163e7a0a876bd22eef5b16d82149eca20a78994c876966f669906c0806a0d03ac8d8aaaa5516bbf344b1b789e1da84a0227d2d2f85b290ac360ce858c9
|
7
|
+
data.tar.gz: 0bd64a36d50f834ca9ca3ed7eb8bdea38897a23480a29b4d7aa7e56fc18f303d187ecdae2c7f51ba838c71b8af6eb8783ea31ed42486e6fec27b21be0062c6da
|
data/lib/tacky.rb
CHANGED
@@ -35,7 +35,13 @@ class Tacky
|
|
35
35
|
undef_method :send
|
36
36
|
|
37
37
|
# Deep nesting will stop at these classes.
|
38
|
-
STOP = [
|
38
|
+
STOP = [
|
39
|
+
Numeric, NilClass,
|
40
|
+
TrueClass, FalseClass,
|
41
|
+
Array, Hash,
|
42
|
+
Time,
|
43
|
+
String
|
44
|
+
].freeze
|
39
45
|
|
40
46
|
def initialize(origin, deep: true)
|
41
47
|
@origin = origin
|
data/tacky.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.rubygems_version = '2.3.3'
|
32
32
|
s.required_ruby_version = '>=2.3'
|
33
33
|
s.name = 'tacky'
|
34
|
-
s.version = '0.3.
|
34
|
+
s.version = '0.3.5'
|
35
35
|
s.license = 'MIT'
|
36
36
|
s.summary = 'Primitive Object Memoization for Ruby'
|
37
37
|
s.description = 'Decorate your existing Ruby object with Tacky
|
data/test/test_tacky.rb
CHANGED
@@ -54,4 +54,13 @@ class TackyTest < Minitest::Test
|
|
54
54
|
assert(first.is_a?(Numeric))
|
55
55
|
assert(bar.child.value == first)
|
56
56
|
end
|
57
|
+
|
58
|
+
def test_stops_on_string
|
59
|
+
foo = Object.new
|
60
|
+
def foo.value
|
61
|
+
'hello'
|
62
|
+
end
|
63
|
+
bar = Tacky.new(foo)
|
64
|
+
assert(bar.value.is_a?(String))
|
65
|
+
end
|
57
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tacky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|