Skip to content

Commit

Permalink
Change where gem stubs go, teach loader how to use them via -S
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Phoenix committed Nov 23, 2009
1 parent 98b5714 commit 73a353c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion kernel/loader.rb
Expand Up @@ -12,6 +12,8 @@ def initialize
@debugging = false
@run_irb = true
@printed_version = false

@gem_bin = File.join Rubinius::CODE_PATH, "gems", "bin"
end

# Finish setting up after loading kernel.
Expand Down Expand Up @@ -165,7 +167,7 @@ def options(argv=ARGV)
options.stop_parsing
@run_irb = false

search = ENV['PATH'].split(File::PATH_SEPARATOR).unshift(BIN_PATH)
search = [BIN_PATH, @gem_bin] + ENV['PATH'].split(File::PATH_SEPARATOR)
dir = search.detect do |d|
path = File.join(d, script)
File.exist?(path)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems/defaults/rbx.rb
Expand Up @@ -5,7 +5,7 @@

module Gem
def self.default_bindir
File.join Rubinius::CODE_PATH, "bin"
File.join Rubinius::CODE_PATH, "gems", "bin"
end

def self.default_dir
Expand Down

0 comments on commit 73a353c

Please sign in to comment.