From: "mame (Yusuke Endoh)" Date: 2012-04-20T05:18:00+09:00 Subject: [ruby-core:44473] [ruby-trunk - Bug #5068] Issue with "duplicated when clause is ignored" Issue #5068 has been updated by mame (Yusuke Endoh). Assignee changed from mame (Yusuke Endoh) to ko1 (Koichi Sasada) Hello, ko1 You changed case duplicate check recently. What do you think about this issue? -- Yusuke Endoh ---------------------------------------- Bug #5068: Issue with "duplicated when clause is ignored" https://bugs.ruby-lang.org/issues/5068#change-26028 Author: sm (Stefano Mioli) Status: Assigned Priority: Normal Assignee: ko1 (Koichi Sasada) Category: Target version: 2.0.0 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://bugs.ruby-lang.org/