Skip to content

Commit

Permalink
[ruby/irb] Fix auto-indent for 1.times do
Browse files Browse the repository at this point in the history
  • Loading branch information
mame authored and aycabta committed Dec 21, 2019
1 parent ec1de78 commit a3cc2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/ruby-lex.rb
Expand Up @@ -336,7 +336,7 @@ def check_newline_depth_difference
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
Expand Down

0 comments on commit a3cc2a2

Please sign in to comment.