From: Stefano Mioli <stefano.mioli@...>
Date: 2011-07-22T00:06:34+09:00
Subject: [ruby-core:38343] [Ruby 1.9 - Bug #5068][Open] Issue with "duplicated when clause is ignored"


Issue #5068 has been reported by Stefano Mioli.

----------------------------------------
Bug #5068: Issue with "duplicated when clause is ignored"
http://redmine.ruby-lang.org/issues/5068

Author: Stefano Mioli
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.9.2-p{180,290}


I'm filing this ticket as suggested by Ryan Davis here:

  http://www.ruby-forum.com/topic/2154866#1011303

Let's consider this snippet:

  x = 0
  case x
  when 1
  when 0
  when 1
  end

Executing a file containing this code with ruby -w, the interpreter will print out this warning:

   warning: duplicated when clause is ignored

Let's consider this one instead:

  x = 0
  case x
  when 1
  when 0 + 1
  when 1
  end

This will *not* print out the same warning, even though we still have a duplicated 'when'.



-- 
http://redmine.ruby-lang.org