summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-07-21 13:00:38 +0900
committerNobuyoshi Nakada <[email protected]>2024-07-21 13:00:38 +0900
commitc544f2672680d3c2992543bd91cdff6e7ce5ec51 (patch)
treee43acef5e9a6f1f926b1f6f49a3b64a76faa9a21 /test
parent3c4dc3e7aca6cfe322247b3b8127d75b776c75e0 (diff)
Fix a typo in setup of block-after-blockcall tests
Unparenthesize the argument and make `command_call` when calling with `do`-block.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11216
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index dc752d5d8a..3ee0ce3e20 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -208,7 +208,7 @@ class TestSyntax < Test::Unit::TestCase
blocks = [['do end', 'do'], ['{}', 'brace']],
*|
[%w'. dot', %w':: colon'].product(methods, blocks) do |(c, n1), (m, n2), (b, n3)|
- m = m.tr_s('()', ' ').strip if n2 == 'do'
+ m = m.tr_s('()', ' ').strip if n3 == 'do'
name = "test_#{n3}_block_after_blockcall_#{n1}_#{n2}_arg"
code = "#{blockcall}#{c}#{m} #{b}"
define_method(name) {assert_valid_syntax(code, bug6115)}