From 870149f01d7ddceed7382bcfa604649743a0fd9d Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 26 Dec 2014 08:37:02 +0200 Subject: [PATCH] apkbuild-gem-resolver: use the << operator to append to arrays --- apkbuild-gem-resolver.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apkbuild-gem-resolver.in b/apkbuild-gem-resolver.in index dbe55f0..c981cdd 100644 --- a/apkbuild-gem-resolver.in +++ b/apkbuild-gem-resolver.in @@ -42,7 +42,7 @@ class Aport fail if aug.match("/augeas#{apath}//error").length > 0 repos = ['main'] - repos.push 'testing' if testing + repos << 'testing' if testing for repo in repos for aport in aug.match "#{apath}/#{repo}/*" FileAport.new(aug, aport) unless aport.end_with? '/ruby' @@ -57,7 +57,7 @@ class Aport for dep in deps aport.add_dependency dep end - @@subpackages.push aport + @@subpackages << aport end end @@ -88,7 +88,7 @@ class Aport end def add_dependency name - @depends.push name + @depends << name end attr_reader :gem, :name, :version @@ -109,7 +109,7 @@ class Aport end def add_user user - @users.push user + @users << user end end @@ -143,7 +143,7 @@ class Update aport = Aport.get name raise 'Invalid package name: ' + name unless aport gem = assign(aport.gem, name) - @deps.push gem.dependency if gem.require_version version + @deps << gem.dependency if gem.require_version version end def resolve @@ -250,7 +250,7 @@ class Update gem = @update.assign(dep.gem, dep.name) gem.check_deps unless deps.reject! { |sdep| sdep.match? dep.gem, gem.version } - @obsolete_deps.push dep.name + @obsolete_deps << dep.name end end