Skip to content

Commit

Permalink
Make sure that the preinstalled dir is always present
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Phoenix committed Nov 15, 2010
1 parent 199d8f0 commit b43d7aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/rubygems.rb
Expand Up @@ -880,6 +880,10 @@ def self.set_paths(gpaths)
@gem_path = [Gem.dir]
end

if Gem.respond_to?(:default_preinstalled_dir)
@gem_path << Gem.default_preinstalled_dir
end

@gem_path.uniq!
end

Expand Down
4 changes: 2 additions & 2 deletions lib/rubygems/defaults/rbx.rb
Expand Up @@ -40,11 +40,11 @@ def self.default_dir
end

def self.default_preinstalled_dir
pre_installed = File.join Rubinius::GEMS_PATH, "rubinius", "preinstalled"
File.join Rubinius::GEMS_PATH, "rubinius", "preinstalled"
end

def self.default_path
dirs = [default_dir, default_preinstalled_dir]
dirs = [default_dir]
# This is the same test rubygems/defaults.rb uses
dirs.unshift(Gem.user_dir) if File.exists?(Gem.user_home)
dirs
Expand Down

0 comments on commit b43d7aa

Please sign in to comment.