summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-21 13:05:16 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-21 13:05:16 +0000
commit7bef465e9b590d4045f5a3babb89ca839d15311f (patch)
tree42189e987870119920539e6fa3409d1fc82c3d20 /test
parentfa5601e7b913288988bca347e4744a2921cfb480 (diff)
range.c: reject ArithmeticSequence in rb_range_values
Reject ArithmeticSequence in rb_range_values so that methods like Array#[] raises TypeError for ArithmeticSequence as an index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 4660891e105..0d0fa94de31 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -2244,6 +2244,7 @@ class TestArray < Test::Unit::TestCase
def test_aref
assert_raise(ArgumentError) { [][0, 0, 0] }
+ assert_raise(TypeError) { [][(1..10).step(2)] }
end
def test_fetch