aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 74da8c1dab..0922cb4c65 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -2651,6 +2651,12 @@ class TestArray < Test::Unit::TestCase
end
end
+ def test_dig
+ h = @cls[@cls[{a: 1}], 0]
+ assert_equal(1, h.dig(0, 0, :a))
+ assert_nil(h.dig(1, 0))
+ end
+
private
def need_continuation
unless respond_to?(:callcc, true)