aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-12-14 16:07:21 +0900
committeraycabta <aycabta@gmail.com>2019-12-22 01:57:35 +0900
commita3cc2a2fbde23637fb924f75e977599b7a475118 (patch)
tree1a995e9dd72ef8b69f3c0bed501556b74fe75d3a
parentec1de789a98923417cf983cb3cdaed003c0f8be6 (diff)
downloadruby-a3cc2a2fbde23637fb924f75e977599b7a475118.tar.gz
[ruby/irb] Fix auto-indent for `1.times do`
Fixes #47 https://github.com/ruby/irb/commit/6b8eca4635
-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 24074f323d..a012d49f69 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -336,7 +336,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
depth_difference += 1
else