deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH 06/10] Incorporate OrderedHash from ActiveSupport
Date Mon, 24 Sep 2012 23:44:08 GMT
On Sat, 2012-09-22 at 23:34 +0200, Michal Fojtik wrote:
> On Sep 21, 2012, at 11:51 PM, lutter@redhat.com wrote:
> 
> > +YAML.add_builtin_type("omap") do |type, val|
> > +  ActiveSupport::OrderedHash[val.map{ |v| v.to_a.first }]
> > +end

That is mysterious .. no idea why the ActiveSupport module is defined;
this should fail. Anyway, I removed the reference to ActiveSupport.

> I don't understand this, where we require 'ActiveSupport' ;-)
> I mean from where this module come from.
> 
> Have you also tried to use some of the 1.9 back porting gems?
> 
> https://github.com/marcandre/backports

This one seems a little too risky to me.

> http://rubygems.org/gems/orderedhash

This one doesn't work, since it assumes every hash has a 'order' method
(you get lots of test failures because there are comparisons
OrderedHash.==(Hash) where the latter doesn't have an order method)

David



Mime
View raw message