File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ def emit_keyword
8787 #
8888 def emit_normal
8989 emit_keyword
90- visit ( condition )
90+ conditional_parentheses ( condition . type . equal? ( :block ) ) do
91+ visit ( condition )
92+ end
9193 emit_body
9294 k_end
9395 end
Original file line number Diff line number Diff line change 3232 # parser crashes
3333 - core/symbol/casecmp_spec.rb
3434 - language/regexp/escapes_spec.rb
35- - library/conditionvariable/broadcast_spec.rb
36- - library/conditionvariable/signal_spec.rb
Original file line number Diff line number Diff line change @@ -1541,6 +1541,13 @@ def foo
15411541 3
15421542 end
15431543 RUBY
1544+
1545+ assert_source <<-'RUBY'
1546+ while (foo do
1547+ end)
1548+ :body
1549+ end
1550+ RUBY
15441551 end
15451552
15461553 context 'until' do
@@ -1554,6 +1561,13 @@ def foo
15541561 3
15551562 end
15561563 RUBY
1564+
1565+ assert_source <<-'RUBY'
1566+ until (foo do
1567+ end)
1568+ :body
1569+ end
1570+ RUBY
15571571 end
15581572
15591573 assert_source <<-'RUBY'
You can’t perform that action at this time.
0 commit comments