summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2024-07-30 11:31:23 +0900
committerYuichiro Kaneko <spiketeika@gmail.com>2024-07-30 12:48:24 +0900
commit7ea678b24b88ec0db9c38d7763d9d1014b5ed46d (patch)
tree21491b5a07909e166dc09e1367f7ea4a7bdb9f06 /test/ruby
parentcdda284cbe6f15b1b6abe3197cd46cc5e8ec06fa (diff)
Add array test cases for `TestParse#test_define_singleton_error`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11276
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_parse.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 20364c5a0d..dbd9f5cf09 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -463,6 +463,8 @@ class TestParse < Test::Unit::TestCase
assert_parse_error(%q[def ((%w();1)).foo; end], msg)
assert_parse_error(%q[def ("#{42}").foo; end], msg)
assert_parse_error(%q[def (:"#{42}").foo; end], msg)
+ assert_parse_error(%q[def ([]).foo; end], msg)
+ assert_parse_error(%q[def ([1]).foo; end], msg)
end
def test_flip_flop