Project

General

Profile

Bug #20401

Updated by nobu (Nobuyoshi Nakada) 8 months ago

When you have a duplicated when clause, you get a warning for it. For example: 

 ```ruby 
 case foo 
 when :bar 
 when :baz 
 when :bar 
 end 
 ``` 

 you get ``warning: `warning: duplicated `when' clause with line 2 is ignored``. ignored`. 

 But the when clause that is ignored is the one on line 4, not line 2. It seems like it's warning for the wrong line.

Back