diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-05-17 00:10:18 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-06-02 16:51:13 -0500 |
commit | 3aa86de9aaf6ba5d5b2850c85d1495d1b23f6a3d (patch) | |
tree | 201f4e0ae379c3a465048620131fabb9813cebd4 | |
parent | fbd7a17f80824d9563b3fe561e69e80625ccf966 (diff) | |
download | bundler-3aa86de9aaf6ba5d5b2850c85d1495d1b23f6a3d.tar.gz |
Use Array#concat instead of push(*ary)
-rw-r--r-- | lib/bundler/definition.rb | 2 | ||||
-rw-r--r-- | lib/bundler/fetcher.rb | 2 | ||||
-rw-r--r-- | lib/bundler/fetcher/compact_index.rb | 2 | ||||
-rw-r--r-- | lib/bundler/fetcher/dependency.rb | 4 | ||||
-rw-r--r-- | lib/bundler/index.rb | 2 | ||||
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 69ecd4fdcc..58fb912626 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -225,7 +225,7 @@ module Bundler source.dependency_names = dependency_names.dup idx.add_source source.specs dependency_names -= pinned_spec_names(source.specs) - dependency_names.push(*source.unmet_deps).uniq! + dependency_names.concat(source.unmet_deps).uniq! end end end diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index 7da22f8ed1..fb9a407791 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -63,7 +63,7 @@ module Bundler FAIL_ERRORS = begin fail_errors = [AuthenticationRequiredError, BadAuthenticationError, FallbackError] fail_errors << Gem::Requirement::BadRequirementError if defined?(Gem::Requirement::BadRequirementError) - fail_errors.push(*NET_ERRORS.map {|e| SharedHelpers.const_get_safely(e, Net) }.compact) + fail_errors.concat(NET_ERRORS.map {|e| SharedHelpers.const_get_safely(e, Net) }.compact) end.freeze class << self diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb index aa284e5fc6..c0e1b3b4cf 100644 --- a/lib/bundler/fetcher/compact_index.rb +++ b/lib/bundler/fetcher/compact_index.rb @@ -41,7 +41,7 @@ module Bundler deps = compact_index_client.dependencies(remaining_gems) next_gems = deps.map {|d| d[3].map(&:first).flatten(1) }.flatten(1).uniq deps.each {|dep| gem_info << dep } - complete_gems.push(*deps.map(&:first)).uniq! + complete_gems.concat(deps.map(&:first)).uniq! remaining_gems = next_gems - complete_gems end diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb index 0e67375de8..a145837a88 100644 --- a/lib/bundler/fetcher/dependency.rb +++ b/lib/bundler/fetcher/dependency.rb @@ -54,7 +54,7 @@ module Bundler gem_list = [] gem_names.each_slice(Source::Rubygems::API_REQUEST_SIZE) do |names| marshalled_deps = downloader.fetch(dependency_api_uri(names)).body - gem_list.push(*Bundler.load_marshal(marshalled_deps)) + gem_list.concat(Bundler.load_marshal(marshalled_deps)) end gem_list end @@ -64,7 +64,7 @@ module Bundler spec_list = [] gem_list.each do |s| - deps_list.push(*s[:dependencies].map(&:first)) + deps_list.concat(s[:dependencies].map(&:first)) deps = s[:dependencies].map {|n, d| [n, d.split(", ")] } spec_list.push([s[:name], s[:number], s[:platform], deps]) end diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index f91efcaf1e..9e7dba8472 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -105,7 +105,7 @@ module Bundler def dependency_names names = [] - each {|s| names.push(*s.dependencies.map(&:name)) } + each {|s| names.concat(s.dependencies.map(&:name)) } names.uniq end diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 8a0fdbaeeb..41ebc87c77 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -212,7 +212,7 @@ module Bundler # Fetch all specs, minus prerelease specs spec_list = fetch_specs(true, false) # Then fetch the prerelease specs - fetch_prerelease_specs.each {|k, v| spec_list[k].push(*v) } + fetch_prerelease_specs.each {|k, v| spec_list[k].concat(v) } spec_list.values.first ensure @@ -605,7 +605,7 @@ module Bundler specs = fetch_specs(source, remote, "specs") pres = fetch_specs(source, remote, "prerelease_specs") || [] - specs.push(*pres) + specs.concat(pres) end def download_gem(spec, uri, path) |