summaryrefslogtreecommitdiff
path: root/lib/rdoc/parsers/parse_rb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/parsers/parse_rb.rb')
-rw-r--r--lib/rdoc/parsers/parse_rb.rb5
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