diff options
Diffstat (limited to 'lib/rdoc/parsers')
-rw-r--r-- | lib/rdoc/parsers/parse_rb.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index b8044c119b..d050829915 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -1997,8 +1997,11 @@ module RDoc case tk when TkSEMICOLON break + when TkLBRACE + nest += 1 when TkRBRACE - break + nest -= 1 + break if nest <= 0 when TkLPAREN, TkfLPAREN nest += 1 when end_token |