ruby-changes:57191
From: Nobuyoshi <ko1@a...>
Date: Tue, 20 Aug 2019 19:30:16 +0900 (JST)
Subject: [ruby-changes:57191] Nobuyoshi Nakada: af12172035 (master): Removed unused literal assignments [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=af12172035 From af121720357e3bcf3d45c0f578d262770c7f45c9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 20 Aug 2019 19:26:12 +0900 Subject: Removed unused literal assignments [ci skip] diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index eba001f..ec2aaaa 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -240,17 +240,14 @@ def sync_default_gems_with_commits(gem, range) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L240 end `git fetch --no-tags #{gem}` - commits = [] - - IO.popen(%W"git log --format=%H,%s #{range}") do |f| - commits = f.read.split("\n").reverse.map{|commit| commit.split(',', 2)} + commits = IO.popen(%W"git log --format=%H,%s #{range}") do |f| + f.read.split("\n").reverse.map{|commit| commit.split(',', 2)} end # Ignore Merge commit and insufficiency commit for ruby core repository. commits.delete_if do |sha, subject| - files = [] - IO.popen(%W"git diff-tree --no-commit-id --name-only -r #{sha}") do |f| - files = f.read.split("\n") + files = IO.popen(%W"git diff-tree --no-commit-id --name-only -r #{sha}") do |f| + f.readlines end subject =~ /^Merge/ || subject =~ /^Auto Merge/ || files.all?{|file| file =~ IGNORE_FILE_PATTERN} end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/