rbenv is great, but switching between Ruby versions with it is kind of a pain since you have to specify full version names all the time. Example:
# change version in shell: $ rbenv shell ree-1.8.7-2012.02 # run command: $ RBENV_VERSION=jruby-220.127.116.11 rake something # enable 1.9 mode: $ RBENV_VERSION=rbx-2.0.0-dev RBXOPT=-X19 ruby -v
rb() is a shell function that fixes this.
$ rb ree $ rb jr rake something $ rb rbx 19 ruby -v
The short version specifier you give is matched against all available versions with grep, and the last match is picked. This means if you say "1.8", it will pick a 1.8.7 version over 1.8.6 if you have both installed. To make it explicit you want 1.8.6, simply say "1.8.6" or just "8.6".