diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-17 23:59:31 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-17 23:59:31 +0000 |
commit | 215fbc639fc63d4300a91ae4c8e30865f6a03f3c (patch) | |
tree | 13f0bc33bcdd0dca931c0af17a6ac1b70dd282f8 /lib/rubygems/validator.rb | |
parent | 9d4f37f51fb2ffdef5e318afb3cb81516dcba4f7 (diff) | |
download | ruby-215fbc639fc63d4300a91ae4c8e30865f6a03f3c.tar.gz |
Fix RubyGems for 1.9, r1780
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/validator.rb')
-rwxr-xr-x | lib/rubygems/validator.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb index 41c457c3cf..8aaaa5a413 100755 --- a/lib/rubygems/validator.rb +++ b/lib/rubygems/validator.rb @@ -42,7 +42,7 @@ module Gem # # gem_path:: [String] Path to gem file def verify_gem_file(gem_path) - File.open gem_path, 'rb' do |file| + open gem_path, Gem.binary_mode do |file| gem_data = file.read verify_gem gem_data end @@ -91,7 +91,7 @@ module Gem begin verify_gem_file(gem_path) - File.open(gem_path, 'rb') do |file| + open gem_path, Gem.binary_mode do |file| format = Gem::Format.from_file_by_path(gem_path) format.file_entries.each do |entry, data| # Found this file. Delete it from list @@ -99,7 +99,7 @@ module Gem next unless data # HACK `gem check -a mkrf` - File.open(File.join(gem_directory, entry['path']), 'rb') do |f| + open File.join(gem_directory, entry['path']), Gem.binary_mode do |f| unless Gem::MD5.hexdigest(f.read).to_s == Gem::MD5.hexdigest(data).to_s then errors[gem_name] << ErrorData.new(entry['path'], "installed file doesn't match original from gem") |