liquid-ext 3.3.3 → 3.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/liquid/ext/hash.rb +2 -2
- data/liquid-ext.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3330de9528c970169abfbd513e19604f46377c4
|
4
|
+
data.tar.gz: 69ace14c510d43eeed3eed326d40305a2e52d9b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c28e3851e8a23f17d8b4f50bd96afb3fbb1eaa9d490f950116dd26128daf3d79b264f63ecaea2108faf1de3738dc056d2e603857ca0668aa0adcf5af993b520a
|
7
|
+
data.tar.gz: dcbfb51b912c9279cdf9ec1a19bf4c2d452ddf8da62331f6824df4560a8f41fe8473bb4994083f5e58f9e51017ff4525b1e3e2b39d8eecf8193fbf90ac74520a
|
data/Gemfile.lock
CHANGED
data/lib/liquid/ext/hash.rb
CHANGED
@@ -6,8 +6,8 @@ class Hash
|
|
6
6
|
# Recursively merge +other_hash+ into +self+ and return the new hash.
|
7
7
|
def deep_merge(other_hash)
|
8
8
|
self.merge(other_hash) do |key, oldval, newval|
|
9
|
-
oldval = oldval.to_hash if oldval.respond_to?(:to_hash)
|
10
|
-
newval = newval.to_hash if newval.respond_to?(:to_hash)
|
9
|
+
oldval = oldval.to_hash if oldval.respond_to?(:to_hash) && !oldval.is_a?(Array)
|
10
|
+
newval = newval.to_hash if newval.respond_to?(:to_hash) && !newval.is_a?(Array)
|
11
11
|
oldval.is_a?(Hash) && newval.is_a?(Hash) ? oldval.deep_merge(newval) : newval
|
12
12
|
end
|
13
13
|
end
|
data/liquid-ext.gemspec
CHANGED