Skip to content

Commit 82ca1d1

Browse files
committed
Add bracket correspondence for nesting to parse_method_or_yield_parameters
1 parent 265ef8b commit 82ca1d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rdoc/parser/ruby.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,10 @@ def parse_method_or_yield_parameters(method = nil,
15871587
case tk[:kind]
15881588
when :on_semicolon then
15891589
break if nest == 0
1590+
when :on_lbracket then
1591+
nest += 1
1592+
when :on_rbracket then
1593+
nest -= 1
15901594
when :on_lbrace then
15911595
nest += 1
15921596
when :on_rbrace then

0 commit comments

Comments
 (0)