On Thu, Aug 24, 2006 at 07:20:06AM +0900, Paul wrote: > > I know there has been a lot of discussion on this lately but I noticed > that the folks over at http://raa.ruby-lang.org/project/orderedhash/ > have produced a class for us! It supports a pretty robust protocol. > > However, if you download the gem and install it, it will error out. I > get a "superclass mismatch for class OrderedHash" error when my rails > controller gets loaded. > > It turns out that rails also defined this class in it's initialize.rb > package. Burned on a namespace collision! Therefore, we can't use > OrderedHash as it's packaged from raa.ruby-lang.org. My solution was to > rename the ordered_hash.rb package to raa_ordered_hash.rb and then > rename the OrderedHash class within it to RaaOrderedClass. [...] Ideally, it's Rails which should be renaming its class. It's not even close to being a hash (it misses even the most basic complexity premises). class OrderedHash < Array #:nodoc: is very telling. I also wonder why it's not defined in the ActiveSupport namespace; some other classes are. And they should use Array#assoc while they're at it. -- Mauricio Fernandez - http://eigenclass.org - singular Ruby