1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Fix auto-indent for 1.times do

Fixes #47

6b8eca4635
This commit is contained in:
Yusuke Endoh 2019-12-14 16:07:21 +09:00 committed by aycabta
parent ec1de789a9
commit a3cc2a2fbd

View file

@ -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