diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-21 10:20:47 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-21 10:20:47 +0000 |
commit | 5335ce0e060c7a2a0b01c57f8f8a64254f2658e1 (patch) | |
tree | c63321cb7c7c5c15454a79d81123c7188be2c51e /lib/rubygems/package/old.rb | |
parent | 2f023c5dbaadede9ceac3eb9ac0e73f3050e5ada (diff) | |
download | ruby-5335ce0e060c7a2a0b01c57f8f8a64254f2658e1.tar.gz |
Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
https://github.com/rubygems/rubygems/pull/2478
* Enable Style/MultilineIfThen in Rubocop
https://github.com/rubygems/rubygems/pull/2479
* Fix required_ruby_version with prereleases and improve error message
https://github.com/rubygems/rubygems/pull/2344
* Fix bundler rubygems binstub not properly looking for bundler
https://github.com/rubygems/rubygems/pull/2426
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/package/old.rb')
-rw-r--r-- | lib/rubygems/package/old.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rubygems/package/old.rb b/lib/rubygems/package/old.rb index a8457948ff..d028be134b 100644 --- a/lib/rubygems/package/old.rb +++ b/lib/rubygems/package/old.rb @@ -19,7 +19,7 @@ class Gem::Package::Old < Gem::Package # Creates a new old-format package reader for +gem+. Old-format packages # cannot be written. - def initialize gem, security_policy + def initialize(gem, security_policy) require 'fileutils' require 'zlib' Gem.load_yaml @@ -49,7 +49,7 @@ class Gem::Package::Old < Gem::Package ## # Extracts the files in this package into +destination_dir+ - def extract_files destination_dir + def extract_files(destination_dir) verify errstr = "Error reading files from gem" @@ -94,7 +94,7 @@ class Gem::Package::Old < Gem::Package ## # Reads the file list section from the old-format gem +io+ - def file_list io # :nodoc: + def file_list(io) # :nodoc: header = String.new read_until_dashes io do |line| @@ -107,7 +107,7 @@ class Gem::Package::Old < Gem::Package ## # Reads lines until a "---" separator is found - def read_until_dashes io # :nodoc: + def read_until_dashes(io) # :nodoc: while (line = io.gets) && line.chomp.strip != "---" do yield line if block_given? end @@ -116,7 +116,7 @@ class Gem::Package::Old < Gem::Package ## # Skips the Ruby self-install header in +io+. - def skip_ruby io # :nodoc: + def skip_ruby(io) # :nodoc: loop do line = io.gets |