From: Jim Weirich Date: 2010-02-04T01:41:41+09:00 Subject: [ruby-core:28035] Re: RCR: RUBY_VERSION_INT On Feb 2, 2010, at 6:08 PM, Hugh Sasse wrote: > Having a Version class would solve this > RUBY_VERSION > '1.9.0.9' > ArgumentError: comparison of Version with String failed > RUBY_VERSION > '1.9.0.9'.to_version > RUBY_VERSION > Version.new('1.9.0.9') > giving appropriate results. > I think it would be useful for all sorts of versionable things. > It could tie in with ranges, with arrays of versions and .include?; > and the semantics could well defined. You actually have a version class: $ ruby -ve 'p Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("1.9")' ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin9.8.0] true -- -- Jim Weirich -- jim.weirich@gmail.com