Bugs: Browse | Submit New | Admin

[#22356] Should be able to compare two different enum types with #eql?

Date:
2008-10-09 14:05
Priority:
3
Submitted By:
Paul Brannan (cout)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Should be able to compare two different enum types with #eql?

Detailed description
Currently this produces an exception:

test.rb:53:in `eql?': Cannot compare Foo to Bar (TypeError)
        from test.rb:53

But it should instead return false.

<=>, <, and > should continue to raise an exception, because there is no ordering for different enum types.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item