mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
String#[] should reject nil index
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user