[前][次][番号順一覧][スレッド一覧]

ruby-changes:56223

From: Nobuyoshi <ko1@a...>
Date: Wed, 26 Jun 2019 10:50:05 +0900 (JST)
Subject: [ruby-changes:56223] Nobuyoshi Nakada: a3d1cacda6 (trunk): Decrease indent at "elsif" too

https://git.ruby-lang.org/ruby.git/commit/?id=a3d1cacda6

From a3d1cacda634b83032f79774d9a0e9e0c9c24cc8 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 26 Jun 2019 08:43:08 +0900
Subject: Decrease indent at "elsif" too


diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 78c5bf3..f8127b7 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -332,7 +332,7 @@ class RubyLex https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-lex.rb#L332
           unless t[3].allbits?(Ripper::EXPR_LABEL)
             depth_difference += 1
           end
-        when 'else', 'rescue', 'ensure', 'when', 'in'
+        when 'else', 'elsif', 'rescue', 'ensure', 'when', 'in'
           depth_difference += 1
         end
       end
@@ -377,7 +377,7 @@ class RubyLex https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-lex.rb#L377
           unless t[3].allbits?(Ripper::EXPR_LABEL)
             spaces_of_nest.push(spaces_at_line_head)
           end
-        when 'else', 'rescue', 'ensure', 'when', 'in'
+        when 'else', 'elsif', 'rescue', 'ensure', 'when', 'in'
           corresponding_token_depth = spaces_of_nest.last
         when 'end'
           if is_first_printable_of_line
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]