Skip to content

Version matching based on minor.patch over major.minor  #318

Description

@tvon

chruby will match based on ${minor}.${patch} instead of ${major}.${minor}, e.g. specifying 2.0 will select 2.2.0 instead of 2.0.0, and (for the sake of testing) specifying 1.5 will select 2.1.5. The latter would be a problem if 2.1.9 were to be released and the user only specified 1.9 in their .ruby-version.

tvon@roberto ~ % chruby --version
chruby: 0.3.9
tvon@roberto ~ % chruby
   jruby-1.7.16.1
   rbx-2.2.10
   ruby-1.9.3-p484
   ruby-1.9.3-p547
   ruby-2.0.0-p353
   ruby-2.0.0-p598
   ruby-2.1.3
   ruby-2.1.5
 * ruby-2.2.0
tvon@roberto ~ % chruby 1.9
tvon@roberto ~ % which ruby
/opt/rubies/ruby-1.9.3-p547/bin/ruby
tvon@roberto ~ % chruby 2.0
tvon@roberto ~ % which ruby
/opt/rubies/ruby-2.2.0/bin/ruby
tvon@roberto ~ % chruby 2.0.0
tvon@roberto ~ % which ruby
/opt/rubies/ruby-2.0.0-p598/bin/ruby
tvon@roberto ~ % chruby 1.3
tvon@roberto ~ % which ruby
/opt/rubies/ruby-2.1.3/bin/ruby

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions