From: daz Date: 2003-11-25T16:07:12+09:00 Subject: Re: raise unless RUBY_VERSION[%r/^\s*\d+\.\d+/o].to_f >= 1.8 "Ara.T.Howard" wrote: > On Tue, 25 Nov 2003, Florian Gross wrote: > > > Ara.T.Howard wrote: > > > > > any better methods of require a specific version/set of versions? > > > > What about RUBY_VERSION >= "1.8.0"? > > > > i thought about this for a while and came up with a good reason not to do this > - but it currently eludes me! > Maybe this bothered you ? RUBY_VERSION = "1.8.1" p RUBY_VERSION >= "1.8" #-> true RUBY_VERSION = "1.10.1" p RUBY_VERSION >= "1.8" #-> false .... but MINOR 10 would upset RUBY_VERSION_CODE (in version.h) which, incidentally, would be a useful global (eventually). It might take the pressure off Matz if 1.9 didn't have to be followed by 2.0 tho' :-) > unless someone can think of a reason not to - i'll take it! > Um, because it's crufty (looks like we can't tell the difference between Numeric and String sorting sequence - even though I've seen it used a lot in Ruby). daz