rbbt-util 5.19.23 → 5.19.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/tsv/manipulate.rb +1 -1
- data/lib/rbbt/util/misc/indiferent_hash.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91047257fae67cf39b69e9bd29183e6ce92351dd
|
4
|
+
data.tar.gz: 6f8ff6f37fa5cbeaddac218994efed5fd2351935
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7690332235fe8741cbaf316550647ffd984cc2efff0929f2b54cdb49f9197689a5601eaef2a731acf46cfea7373fd5f40fcb5f752c696e6fb144566ff70f1d62
|
7
|
+
data.tar.gz: fd20980da6e6cd09e6e57adf83a3bf8e69ee23b33f86b7b57768a0c00086919a80b1a39439d1d8e06c82abd93ebe4c44b2fcb9e7c0bd13d755778f9622df7c08
|
data/lib/rbbt/tsv/manipulate.rb
CHANGED
@@ -19,9 +19,13 @@ module IndiferentHash
|
|
19
19
|
super(key,value)
|
20
20
|
end
|
21
21
|
|
22
|
+
def _default?
|
23
|
+
@_default ||= self.default or self.default_proc
|
24
|
+
end
|
25
|
+
|
22
26
|
def [](key)
|
23
27
|
res = super(key)
|
24
|
-
return res unless res.nil?
|
28
|
+
return res unless res.nil? or (_default? and not keys.include? key)
|
25
29
|
|
26
30
|
case key
|
27
31
|
when Symbol, Module
|
@@ -29,7 +33,7 @@ module IndiferentHash
|
|
29
33
|
when String
|
30
34
|
super(key.to_sym)
|
31
35
|
else
|
32
|
-
|
36
|
+
res
|
33
37
|
end
|
34
38
|
end
|
35
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.19.
|
4
|
+
version: 5.19.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|