On Jul 17, 2011, at 13:37 , Stefano Mioli wrote:

> On 7/17/11 9:25 PM, Brian Candler wrote:
>> Stefano Mioli wrote in post #1011159:
>>> x =3D 1
>>> case x
>>> when 0
>>> when 1
>>> when 1 + 0
>>> when 1
>>> end
>>>=20
>>> 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).
>>>=20
>>> I wonder if I should file a ticket.
>>=20
>> 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.
>=20
> 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.
>=20
> Or am I missing something?

I don't think you're missing anything. Considering the following causes =
the warning as well:

x =3D 1
case x
when 1
when 0
when 1
end

I think you came up with a bug. Could you file a ticket on ruby-core's =
rubymine tracker?