ruby-changes:50958
From: nobu <ko1@a...>
Date: Mon, 16 Apr 2018 17:54:09 +0900 (JST)
Subject: [ruby-changes:50958] nobu:r63165 (trunk): parse.y: `else` indent
nobu 2018-04-16 17:54:03 +0900 (Mon, 16 Apr 2018) New Revision: 63165 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63165 Log: parse.y: `else` indent * parse.y (keyword_else): warn less-indented `else` than `case`. [ruby-core:86492] [Bug #14674] Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 63164) +++ parse.y (revision 63165) @@ -2749,7 +2749,9 @@ k_when : keyword_when https://github.com/ruby/ruby/blob/trunk/parse.y#L2749 k_else : keyword_else { - token_info_warn(p, "else", p->token_info, 1, &@$); + token_info *ptinfo_beg = p->token_info; + int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0; + token_info_warn(p, "else", p->token_info, same, &@$); } ; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/