Ticket #134 (new defect)

Opened 7 months ago

The Strange Lineage and Comparisons of Hpricot::Text

Reported by: empact Owned by: _why
Priority: major Milestone:
Component: lib/hpricot Version:
Keywords: equality Hpricot::Text Cc:

Description

In your mother tongue, or my closest approximation:

One would think we should all be very disappointed with Hpricot::Text, who has forgotten the stories of his fathers, and does not know how closely akin he is with String.

Briefly:

 >> text = Hpricot::Text.new('howdy!')
 => "howdy!"
 >> text == 'howdy!'
 => false
 >> text.eql? 'howdy!'
 => false

Inheritance might be appropriate, and necessary for the sake of commutativity, but may be problematic, what with wild code in the wild.

Note: See TracTickets for help on using tickets.