ruby-changes:59358
From: Yusuke <ko1@a...>
Date: Sun, 22 Dec 2019 01:58:02 +0900 (JST)
Subject: [ruby-changes:59358] 616f1357c3 (master): [ruby/irb] Make nesting level up for `1.times do`
https://git.ruby-lang.org/ruby.git/commit/?id=616f1357c3 From 616f1357c3030fad73c42ea061a7f21b0df57fb5 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 14 Dec 2019 16:14:43 +0900 Subject: [ruby/irb] Make nesting level up for `1.times do` Follow up of the previous commit https://github.com/ruby/irb/commit/ab207353d3 diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index a012d49..b4c31c1 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -293,7 +293,7 @@ class RubyLex https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-lex.rb#L293 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 indent += 1 else -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/