From a3cc2a2fbde23637fb924f75e977599b7a475118 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sat, 14 Dec 2019 16:07:21 +0900 Subject: [ruby/irb] Fix auto-indent for `1.times do` Fixes #47 https://github.com/ruby/irb/commit/6b8eca4635 --- lib/irb/ruby-lex.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3