From 8af0e113f698ffb59e63f7bdc2f6c79a0cc94e8d Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 4 Jan 2009 08:07:22 +0000 Subject: * lib/rubygems.rb (Gem.set_home, Gem.set_paths): should not create directories stealthily. [ruby-core:20990] * lib/rubygems.rb (Gem.find_home): expand_path deals with platform dependent envirionments. * lib/rdoc/ri/paths.rb (RDoc::HOMEDIR): ditto. * instruby.rb (gem): creates gem directories at installation. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/ri/paths.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/rdoc') diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb index 2f72b9dfd..fcafb279f 100644 --- a/lib/rdoc/ri/paths.rb +++ b/lib/rdoc/ri/paths.rb @@ -31,13 +31,7 @@ module RDoc::RI::Paths base = File.join(RbConfig::CONFIG['datadir'], "ri", VERSION) SYSDIR = File.join(base, "system") SITEDIR = File.join(base, "site") - homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH'] - - if homedir then - HOMEDIR = File.join(homedir, ".rdoc") - else - HOMEDIR = nil - end + HOMEDIR = (File.expand_path("~/.rdoc") rescue nil) begin require 'rubygems' unless defined?(Gem) and defined?(Gem::Enable) and -- cgit