From: Nikodemus Siivola Date: 2002-10-22T21:03:14+09:00 Subject: Re: Sort::Versions (was Re: Perl multiple match RE in Ruby?) On Tue, 22 Oct 2002, michael libby wrote: > My natural tendency is to want the version_cmp method in String and > version_sort in Array... would it make more sense to simply do: > That would save the step of extending those classes in code. How about adding that to the Version module inside a BuiltinExt module, so that to extend the classes you would just: require 'version' include Version::BuiltinExt But those that do not like to see String and array extended, or would like to extend some other String or Array like class could still use: Version.cmp(a,b) or MyClass.extend Version::Cmp This (extension api design) is one area that would really deserve a "Best Practices" doc. -- Nikodemus