tonsser_hash_utils 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hash_with_quick_access.rb +5 -1
- data/lib/tonsser_hash_utils/version.rb +1 -1
- data/spec/lib/hash_with_quick_access_spec.rb +10 -0
- 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: c0ca8eee5e33287735e7ff0dd2378f23c6ae751429d7446a329f39ac90889cb8
|
4
|
+
data.tar.gz: f93694d8ffa36d6dd3d5685399c0010b984583318e4bc4d7fc5c413ba3a29586
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 316f000845afcd76cbf374498feba119f39bbd13796c6e1cba6ed6189b813428e7869370fd9e1a78abb5c1be0600922f161a1b4c4967cd958da20ec1877297dc
|
7
|
+
data.tar.gz: a8b21521b44c1b4b6e15c775e9ddfb747a1be2a9eba443fee10ebd06e75d92b9f03756af1c5ffffab2ab92909c85cd5c2a0cb87284e3bba716c9c78d5032908a
|
@@ -85,6 +85,16 @@ describe HashWithQuickAccess do
|
|
85
85
|
expect(hash.methods - Object.new.methods).to include :a
|
86
86
|
end
|
87
87
|
|
88
|
+
it "doesn't memoize Hash methods" do
|
89
|
+
pp (Hash.new.methods - Object.new.methods).sort
|
90
|
+
raise
|
91
|
+
|
92
|
+
hash = HashWithQuickAccess.new(a: 1)
|
93
|
+
|
94
|
+
expect(hash.key?(:a)).to eq true
|
95
|
+
expect(hash.key?(:a)).to eq true
|
96
|
+
end
|
97
|
+
|
88
98
|
it "can monkey patch Hash with a convenience method" do
|
89
99
|
HashWithQuickAccess.add_convenience_method_to_hash!
|
90
100
|
|