Skip to content

Commit

Permalink
Test against the target class
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 1, 2021
1 parent cd4f5b1 commit 0729052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/ruby/test_array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,8 @@ def test_concat
b.concat(b, b)
assert_equal([4, 5, 4, 5, 4, 5], b)

assert_raise(TypeError) { [0].concat(:foo) }
assert_raise(FrozenError) { [0].freeze.concat(:foo) }
assert_raise(TypeError) { @cls[0].concat(:foo) }
assert_raise(FrozenError) { @cls[0].freeze.concat(:foo) }

a = @cls[nil]
def (x = Object.new).to_ary; Array.new(10) {nil} << :ok; end
Expand Down

0 comments on commit 0729052

Please sign in to comment.