From: Stefano Mioli Date: 2011-07-18T05:37:00+09:00 Subject: Re: duplicated when clause is ignored On 7/17/11 9:25 PM, Brian Candler wrote: > Stefano Mioli wrote in post #1011159: >> x = 1 >> case x >> when 0 >> when 1 >> when 1 + 0 >> when 1 >> end >> >> is enough to fool iseq_set_sequence(), making it print out no warnings >> at all, even though we still *do* have a duplicate 'when' clause (let >> alone that there are actually 3 duplicated clauses). >> >> I wonder if I should file a ticket. > > It isn't necessarily duplicated. You might have redefined Numeric#+ to > have a side-effect. It would be a silly thing to do, but Ruby doesn't > know you've not done that. True, but there are still two identical "when 1". My point is that adding a "when 1 + 0" between them makes the warning go away when it shouldn't. Or am I missing something? -- Stefano Mioli