diff --git a/Formula/jruby.rb b/Formula/jruby.rb index 625f6d17a33d5..95b033e3588de 100644 --- a/Formula/jruby.rb +++ b/Formula/jruby.rb @@ -9,11 +9,13 @@ def install # Remove Windows files rm Dir['bin/*.{bat,dll,exe}'] - # Prefix a 'j' on some commands cd 'bin' do - Dir['*'].each do |file| - mv file, "j#{file}" unless file.match /^[j]/ - end + # Prefix a 'j' on some commands to avoid clashing with other ruby installations + ['ast', 'rake', 'rdoc', 'ri', 'testrb'].each { |f| mv f, "j#{f}" } + # Delete some unnecessary command + # gem is a wrapper script for jgem + # irb is an identical copy of jirb + ['gem', 'irb'].each { |f| rm f } end # Only keep the OS X native libraries