aboutsummaryrefslogtreecommitdiffstats
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.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 42e942ca38..6876cfe0fc 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -2020,6 +2020,8 @@ module RDoc
when TkLBRACE
nest += 1
when TkRBRACE
+ # we might have a.each {|i| yield i }
+ unget_tk(tk) if nest.zero?
nest -= 1
break if nest <= 0
when TkLPAREN, TkfLPAREN