Commit graph

2 commits

Author SHA1 Message Date
Mislav Marohnić
7e0e85bdda Avoid JRuby warning during rehash Rubygems plugin
As it seems, JRuby 1.7 complains on stderr every time you invoke `system`:

    warning: executable? does not in this environment and will return a dummy value

It doesn't seem to complain when backtics are used. It's safe to use
backticks here because `rbenv rehash` doesn't output anything on stdout,
and the exit status of the command is irrelevant.
2014-10-19 18:06:09 +02:00
Mislav Marohnić
67f429c41d Bring automatic gem-rehash functionality to rbenv core
This bakes in the functionality of rbenv-gem-rehash plugin.

The Rubygems hook is improved:

- It will not rehash for gems installed in locations that rbenv otherwise
  doesn't search for binstubs; for instance in case of
  `bundle --path vendor/bundle`.
- It rescues exceptions and makes them non-lethal by warning on stderr.
2014-10-19 14:35:43 +02:00