summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-22 12:20:52 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-22 12:20:52 +0000
commitf06ec31c54992da9eb1a69e34e69ec846aa25d2b (patch)
treec64bfb7d8d02ad1f8d0e83634da489a2a1bb7825
parent4520a3408afe2f30c4513ace4a00107c6a547ea3 (diff)
* lib/rubygems/test_case.rb: save current dir to @current_dir
before Dir.chdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/rubygems/test_case.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 16368c2d0c..0b7fd32e96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 22 21:20:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems/test_case.rb: save current dir to @current_dir
+ before Dir.chdir.
+
Tue Mar 22 20:10:04 2011 Tanaka Akira <akr@fsij.org>
* ext/psych/parser.c: parenthesize macro arguments.
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 3b6b3c7f7f..895002df05 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -106,6 +106,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
@orig_gem_home = ENV['GEM_HOME']
@orig_gem_path = ENV['GEM_PATH']
+ @current_dir = Dir.pwd
@ui = Gem::MockGemUi.new
tmpdir = nil
Dir.chdir Dir.tmpdir do tmpdir = Dir.pwd end # HACK OSX /private/tmp
@@ -208,7 +209,7 @@ class Gem::TestCase < MiniTest::Unit::TestCase
Gem::RemoteFetcher.fetcher = nil
end
- Dir.chdir @@project_dir
+ Dir.chdir @current_dir
FileUtils.rm_rf @tempdir unless ENV['KEEP_FILES']