Project

General

Profile

Actions

Bug #20401

closed

Duplicated when clause warning line number

Added by kddnewton (Kevin Newton) 8 months ago. Updated 6 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:117368]

Description

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

case foo
when :bar
when :baz
when :bar
end

you get warning: duplicated `when' clause with line 2 is 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0