From: Mauricio Fernandez Date: 2006-02-03T06:09:06+09:00 Subject: Re: [RCR] meaningful RUBY_VERSION#<=> On Fri, Feb 03, 2006 at 05:29:10AM +0900, Ara.T.Howard wrote: > module ::Kernel > def RubyVersion *a, &b > RubyVersion::new *a, &b > end > v = $VERBOSE > $VERBOSE = nil > ::RUBY_VERSION = RubyVersion(::RUBY_VERSION) > $VERBOSE = v > end > end > > p RUBY_VERSION > p RUBY_VERSION > "1.8.3" > p RUBY_VERSION > "1.9.0" > > harp:~ > ruby a.rb > "1.8.4" > true > false matz has said that 1.8.10 (or more generally versions with 2 digits in one of the components) will not happen. Isn't String#<=> enough? (unless you absolutely want major, minor & tiny) On a stock install: RUBY_VERSION # => "1.8.4" RUBY_VERSION > "1.8.3" # => true RUBY_VERSION > "1.9.0" # => false -- Mauricio Fernandez