aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/validator.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 02:58:35 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 02:58:35 +0000
commit7112c6a1c15b26eebf0c020dfee7abd30eebde2d (patch)
tree16e0369e6aa7aee5bbbf79ba3d5ceacb53084534 /lib/rubygems/validator.rb
parenteb537609ba0de060c6633dc3e7dd9ba5e85c6d1b (diff)
downloadruby-7112c6a1c15b26eebf0c020dfee7abd30eebde2d.tar.gz
Merge RubyGems-2.7.5 from upstream.
Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/validator.rb')
-rw-r--r--lib/rubygems/validator.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb
index 83448229bb..6842e4fa9c 100644
--- a/lib/rubygems/validator.rb
+++ b/lib/rubygems/validator.rb
@@ -34,7 +34,7 @@ class Gem::Validator
# gem_path:: [String] Path to gem file
def verify_gem_file(gem_path)
- open gem_path, Gem.binary_mode do |file|
+ File.open gem_path, Gem.binary_mode do |file|
gem_data = file.read
verify_gem gem_data
end
@@ -109,7 +109,7 @@ class Gem::Validator
good, gone, unreadable = nil, nil, nil, nil
- open gem_path, Gem.binary_mode do |file|
+ File.open gem_path, Gem.binary_mode do |file|
package = Gem::Package.new gem_path
good, gone = package.contents.partition { |file_name|
@@ -134,7 +134,7 @@ class Gem::Validator
source = File.join gem_directory, entry['path']
- open source, Gem.binary_mode do |f|
+ File.open source, Gem.binary_mode do |f|
unless f.read == data then
errors[gem_name][entry['path']] = "Modified from original"
end