postmodern / chruby

Changes the current Ruby
MIT License
2.88k stars 189 forks source link

`chruby 2.1` has surprise match #445

Open lloeki opened 4 years ago

lloeki commented 4 years ago

Spot the mistake:

$ chruby
   ruby-1.9.3-p551
   ruby-2.0.0-p648
   ruby-2.1.10
   ruby-2.2.10
   ruby-2.3.8
   ruby-2.4.10
   ruby-2.5.8
   ruby-2.6.6
   ruby-2.7.1
$ chruby 2.1
$ chruby
   ruby-1.9.3-p551
   ruby-2.0.0-p648
   ruby-2.1.10
 * ruby-2.2.10
   ruby-2.3.8
   ruby-2.4.10
   ruby-2.5.8
   ruby-2.6.6
   ruby-2.7.1

The match is fairly naive, so to discriminate, one has to write either 2.1. or ruby-2.1 (both being incompatible with rbenv, which is sadly what may end up in .ruby-version)

Fryguy commented 9 months ago

This looks like a duplicate of #291