Skip to content

Commit 6b8eca4

Browse files
committed
Fix auto-indent for 1.times do
Fixes #47
1 parent 67fa48b commit 6b8eca4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/irb/ruby-lex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def check_newline_depth_difference
336336
next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
337337
case t[2]
338338
when 'do'
339-
if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN)
339+
if index > 0 and @tokens[index - 1][3].anybits?(Ripper::EXPR_CMDARG | Ripper::EXPR_ENDFN | Ripper::EXPR_ARG)
340340
# method_with_block do; end
341341
depth_difference += 1
342342
else

0 commit comments

Comments
 (0)