Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > RubyGems, Dependency sort

Reply
Thread Tools

RubyGems, Dependency sort

 
 
Erik Veenstra
Guest
Posts: n/a
 
      12-18-2004

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.

 
Reply With Quote
 
 
 
 
Chad Fowler
Guest
Posts: n/a
 
      12-19-2004
On Sun, 19 Dec 2004 01:07:08 +0900, Erik Veenstra <> 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://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 20,000 gems served!)


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: When will Thunderbird support sort in place (in context sort)? Ron Natalie Firefox 0 02-02-2006 04:38 AM
The Colourised Bewitched -- sort of OK....... sort of! anthony DVD Video 26 06-28-2005 04:39 AM
xsl:sort lang="es" modern vs. tradidional Spanish sort order nobody XML 0 06-01-2004 06:25 AM
What is faster? C++ vector sort or sort in database JerryJ C++ 11 04-28-2004 10:23 PM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM



Advertisments