aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index c08908fa76..01990618fb 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -1305,7 +1305,8 @@ class TestHash < Test::Unit::TestCase
def test_dig
h = @cls[a: @cls[b: [1, 2, 3]], c: 4]
assert_equal(1, h.dig(:a, :b, 0))
- assert_nil(h.dig(:c, 1))
+ assert_nil(h.dig(:b, 1))
+ assert_raise(TypeError) {h.dig(:c, 1)}
o = Object.new
def o.dig(*args)
{dug: args}