summaryrefslogtreecommitdiff
path: root/lib/hashie/mash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hashie/mash.rb')
-rw-r--r--lib/hashie/mash.rb22
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb
index d5cb308..21bcadb 100644
--- a/lib/hashie/mash.rb
+++ b/lib/hashie/mash.rb
@@ -322,22 +322,18 @@ module Hashie
self.class.new(other_hash).merge(self)
end
- with_minimum_ruby('2.3.0') do
- def dig(*keys)
- super(*keys.map { |key| convert_key(key) })
- end
+ def dig(*keys)
+ super(*keys.map { |key| convert_key(key) })
end
- with_minimum_ruby('2.4.0') do
- def transform_values(&blk)
- self.class.new(super(&blk))
- end
+ def transform_values(&blk)
+ self.class.new(super(&blk))
+ end
- # Returns a new instance of the class it was called on, with nil values
- # removed.
- def compact
- self.class.new(super)
- end
+ # Returns a new instance of the class it was called on, with nil values
+ # removed.
+ def compact
+ self.class.new(super)
end
with_minimum_ruby('2.5.0') do