blob: 1680a11e7d5a49741a7ca7d37c74ed1af6aba219 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$NetBSD: patch-ah,v 1.2 2008/04/13 06:01:59 jlam Exp $
--- lib/rubygems.rb.orig 2008-04-09 17:18:31.000000000 -0400
+++ lib/rubygems.rb
@@ -213,7 +213,13 @@ module Gem
##
# The path where gem executables are to be installed.
- def self.bindir(install_dir=Gem.dir)
+ def self.bindir(install_dir=Gem.dir, install_root=nil)
+ unless install_root.nil?
+ install_root_path = Pathname.new install_root
+ install_dir_path = Pathname.new install_dir
+ install_dir_path = install_dir_path.relative_path_from install_root_path
+ install_dir = install_dir_path.expand_path File::SEPARATOR
+ end
return File.join(install_dir, 'bin') unless
install_dir.to_s == Gem.default_dir
Gem.default_bindir
|