[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RubyGems, Dependency sort

Erik Veenstra

12/18/2004 4:06:00 PM


I wanted to sort an array of dependencies of a gem. But there
was no "<=>". So I created one:

module Gem
class Dependency
def <=>(other)
[@name] <=> [other.name]
end
end
end

To be included in RubyGems?

gegroet,
Erik V.

1 Answer

Chad Fowler

12/19/2004 12:17:00 AM

0

On Sun, 19 Dec 2004 01:07:08 +0900, Erik Veenstra <pan@erikveen.dds.nl> wrote:
>
> I wanted to sort an array of dependencies of a gem. But there
> was no "<=>". So I created one:
>
> module Gem
> class Dependency
> def <=>(other)
> [@name] <=> [other.name]
> end
> end
> end
>
> To be included in RubyGems?


It's in CVS. Thanks!

Chad Fowler
http://chad...
http://rubyc...
http://ruby...
http://rubygems.rub... (over 20,000 gems served!)