On Tue, 25 Nov 2003, Ara.T.Howard wrote:

# On Tue, 25 Nov 2003, Gennady wrote:
# 
# > Date: Tue, 25 Nov 2003 14:56:03 +0900
# > From: Gennady <bystr / mac.com>
# > Newsgroups: comp.lang.ruby
# > Subject: Re: raise unless RUBY_VERSION[%r/^\s*\d+\.\d+/o].to_f >= 1.8
# > 
# > 
# > 
# > On Nov 24, 2003, at 20:42, Ara.T.Howard wrote:
# > 
# > > On Tue, 25 Nov 2003, Florian Gross wrote:
# > >
# > >> Date: Tue, 25 Nov 2003 08:54:02 +0900
# > >> From: Florian Gross <flgr / ccan.de>
# > >> Newsgroups: comp.lang.ruby
# > >> Subject: Re: raise unless RUBY_VERSION[%r/^\s*\d+\.\d+/o].to_f >= 1.8
# > >>
# > >> Moin!
# > >>
# > >> Ara.T.Howard wrote:
# > >>
# > >>> any better methods of require a specific version/set of versions?
# > >>
# > >> What about RUBY_VERSION >= "1.8.0"?
# > >>
# > >> Regards,
# > >> Florian Gross
# > >
# > > i thought about this for a while and came up with a good reason not to  
# > > do this
# > > - but it currently eludes me!
# > >
# > > unless someone can think of a reason not to - i'll take it!
# > 
# > It does not work as a general solution, as "1.11.0" < "1.8.0". However,  
# > bearing in mind that Ruby so far had only 1-digit version components  
# > and 1.9.x is going to be the last Ruby1 version (according to Matz),  
# > this check may be OK.
# 
# ah yes - _did_ think of that at one point.  must have drank more coffee that
# day.  thatnks for the heads up.  definitely best to stick with a 'to_f' type
# impl for now.
# 
# it would be really good if there was a 'standard' way to do this.
# 
# at one point, i created a Version class which used the rules that 'ld'
# follows:
# 
#   interface.age.revision
# 
# etc. etc.
# 


See my previous post about the Version class from RubyGems.  It handles 
the cases that you need.

Chad