For anyone using the #fish_shell, the following #shell_function definition will let you switch to the latest CRuby #chruby knows about. It could be simplified (e.g. setting a function-local variable is mostly for debugging) or use builtins instead of pipes in shells where that matters, but I still find it useful for myself. Maybe you will, too.
```fish
function chruby-latest
set latest (
chruby | tr -d '*' |
pcregrep -o '\bruby-[\d.]+' | tail -1)
chruby $latest
end
```