diff options
author | Kenta Murata <[email protected]> | 2020-10-20 16:00:35 +0900 |
---|---|---|
committer | Kenta Murata <[email protected]> | 2020-10-20 16:01:57 +0900 |
commit | 18cecda46e427362fa3447679e5d8a917b5d6cb6 (patch) | |
tree | 467a219e1132d554205b784a58b4137615813e9c /test | |
parent | ade411465dc054af5ff025531649b69134d74b56 (diff) |
range.c: Fix an exception message in rb_range_beg_len
[Bug #17271]
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_array.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 5d1785220e..bc5d86354e 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -2381,6 +2381,9 @@ class TestArray < Test::Unit::TestCase assert_raise(ArgumentError) { [0].freeze[0, 0, 0] = 0 } assert_raise(TypeError) { [0][:foo] = 0 } assert_raise(FrozenError) { [0].freeze[:foo] = 0 } + + # [Bug #17271] + assert_raise_with_message(RangeError, "-7.. out of range") { [*0..5][-7..] = 1 } end def test_first2 |