postmodern/chruby — pull request #195 by halostatue (2013-08-29 02:51:48+00:00)
Title: Remove trailing slashes from RUBIES

I use `zsh` and my `$RUBIES` looks like:

/Users/austin/.rubies/ruby-1.9.3-p448/

It has to do with some `zsh` option that I have set, but I don't recall which offhand. This change includes two fixes for this and a minor change elsewhere:

- Make `$dir` local when setting `$RUBIES` in the first place. Prevents it from leaking outside of where it's needed.
- The trailing slash prevents Ruby versions from being printed in the `"")` case; remove it on processing.
- The trailing slash prevents a Ruby version from being matched in the `*)` case; remove it on processing.