summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index a56862fe2..63e4af000 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -72,6 +72,10 @@ assert('String#[]', '15.2.10.5.6') do
assert_equal 'bc', e1
assert_equal 'bc', a3
assert_nil b3
+
+ assert_raise(TypeError) do
+ a[nil]
+ end
end
assert('String#[] with Range') do