summaryrefslogtreecommitdiff
path: root/test/ostruct/test_ostruct.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-12 21:40:50 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-12 21:40:50 +0000
commit13d8bb03859255049dd10046a0a1a24352ec8110 (patch)
tree69b6080f22c9ac2891427cfe1159e65ffa1ad38d /test/ostruct/test_ostruct.rb
parent96c4fa0b0905e6f587fcacfa8acd2e384057aeb5 (diff)
* lib/ostruct.rb: Have OpenStruct#dig raise if argument is not a symbol
nor a string. See [#11762] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ostruct/test_ostruct.rb')
-rw-r--r--test/ostruct/test_ostruct.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb
index d8d4cd3..b098992 100644
--- a/test/ostruct/test_ostruct.rb
+++ b/test/ostruct/test_ostruct.rb
@@ -116,7 +116,7 @@ class TC_OpenStruct < Test::Unit::TestCase
os2.child = [42]
assert_equal :bar, os1.dig("child", :foo)
assert_nil os1.dig("parent", :foo)
- assert_nil os1.dig("child", 0)
+ assert_raise(TypeError) { os1.dig("child", 0) }
end
def test_to_h