summaryrefslogtreecommitdiff
path: root/lib/hashie/mash.rb
diff options
context:
space:
mode:
authorMichael Herold <opensource@michaeljherold.com>2019-12-13 12:06:06 -0600
committerMichael Herold <opensource@michaeljherold.com>2019-12-13 12:57:40 -0600
commit0d085afd391193a63c005b8f0fef5ed4be79910c (patch)
tree081b59b732b150e926b28e166ed26d124702bdfe /lib/hashie/mash.rb
parent9c6b5c860aa77bdfaaf416c5c098536b7e2eed5c (diff)
downloadhashie-0d085afd391193a63c005b8f0fef5ed4be79910c.tar.gz
Ensure that Hashie::Arrays are not deconverted
In order for `#dig` to work properly, we need Arrays to be `Hashie::Array`s to be aware of the key conversion. Our original `Mash#convert_value` method was deconverting `Hashie::Array`s into normal Arrays and causing `#dig` to behave in an unexpected manner.
Diffstat (limited to 'lib/hashie/mash.rb')
-rw-r--r--lib/hashie/mash.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb
index f832e98..97d6fa6 100644
--- a/lib/hashie/mash.rb
+++ b/lib/hashie/mash.rb
@@ -382,8 +382,6 @@ module Hashie
when ::Hash
val = val.dup if duping
self.class.new(val)
- when Array
- val.map { |e| convert_value(e) }
when ::Array
Array.new(val.map { |e| convert_value(e) })
else