$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