aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-12-14 16:14:43 +0900
committeraycabta <aycabta@gmail.com>2019-12-22 01:57:35 +0900
commit616f1357c3030fad73c42ea061a7f21b0df57fb5 (patch)
tree6d0427e48357cbf80fe3d36572df6d602245d4c2
parenta3cc2a2fbde23637fb924f75e977599b7a475118 (diff)
downloadruby-616f1357c3030fad73c42ea061a7f21b0df57fb5.tar.gz
[ruby/irb] Make nesting level up for `1.times do`
Follow up of the previous commit https://github.com/ruby/irb/commit/ab207353d3
-rw-r--r--lib/irb/ruby-lex.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index a012d49f69..b4c31c16fe 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -293,7 +293,7 @@ class RubyLex
next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
case t[2]
when 'do'
- if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN)
+ if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN | Ripper::EXPR_ARG)
# method_with_block do; end
indent += 1
else