summaryrefslogtreecommitdiff
path: root/lib/rubygems/test_utilities.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-26 02:06:00 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-26 02:06:00 +0000
commit8b424513fd43c398aaeea5dede8bbc5c51602773 (patch)
treeb1509d7a77a52206f7825520c99a693f7818a8a4 /lib/rubygems/test_utilities.rb
parentdbf3fb3d8e6e10e2ac2af19937e0016a4815ca50 (diff)
Upgrade to RubyGems 1.2.0 r1824. Incorporates [ruby-core:17353].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/test_utilities.rb')
-rw-r--r--lib/rubygems/test_utilities.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb
index 0486db2b32..e8709b9be3 100644
--- a/lib/rubygems/test_utilities.rb
+++ b/lib/rubygems/test_utilities.rb
@@ -30,7 +30,7 @@ class Gem::FakeFetcher
@paths = []
end
- def fetch_path(path)
+ def fetch_path path, mtime = nil
path = path.to_s
@paths << path
raise ArgumentError, 'need full URI' unless path =~ %r'^http://'
@@ -40,7 +40,12 @@ class Gem::FakeFetcher
raise Gem::RemoteFetcher::FetchError.new('no data', path)
end
- data.respond_to?(:call) ? data.call : data
+ if data.respond_to?(:call) then
+ data.call
+ else
+ data = Gem.gunzip data if path.to_s =~ /gz$/ unless data.empty?
+ data
+ end
end
def fetch_size(path)