sstephenson/ruby-build — pull request #473 by neovatar (2013-12-17 18:38:48+00:00)
Title: Update JRruby shebangs after a `ruby-build install jruby ...`

The default shebang of a the scripts in a JRuby installation is `#!/usr/bin/env jruby`. On a rbenv managed JRuby, this will execute a rbenv managed shim. In a situation, where a JRuby tool like `gem` is executed from within of a running rbenv by a rbenv plugin, (e.g. rbenv-gemset) this can trigger another rbenv run to resolve the shim. This can lead to an endless loop of rbenv calls.

* After JRuby installation, check JRuby bin directory for files with
standard jruby shebang
* Replace all standard `!/usr/bin/env jruby` shebangs with a shebang
pointing directly to the JRuby binary

Fixes sstephenson/ruby-build#471