ruby-changes:69672
From: David <ko1@a...>
Date: Tue, 9 Nov 2021 21:21:50 +0900 (JST)
Subject: [ruby-changes:69672] 0d3898ec7b (master): [rubygems/rubygems] Remove more unused stuff from make command parsing
https://git.ruby-lang.org/ruby.git/commit/?id=0d3898ec7b From 0d3898ec7b94b737fd9e0a9df1d0a944a9709564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Tue, 9 Nov 2021 11:52:44 +0100 Subject: [rubygems/rubygems] Remove more unused stuff from make command parsing https://github.com/rubygems/rubygems/commit/eba7d173d4 --- test/rubygems/helper.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index f2644d7eff8..1d27baad1fb 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -245,16 +245,14 @@ class Gem::TestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/helper.rb#L245 output.scan(/^#{Regexp.escape make_command}(?:[[:blank:]].*)?$/) end - def parse_make_command_line(line) + def parse_make_command_line_targets(line) args = line.sub(/^#{Regexp.escape make_command}/, "").shellsplit targets = [] - macros = {} args.each do |arg| case arg when /\A(\w+)=/ - macros[$1] = $' else targets << arg end @@ -262,11 +260,7 @@ class Gem::TestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/helper.rb#L260 targets << '' if targets.empty? - { - :command => make_command, - :targets => targets, - :macros => macros, - } + targets end def assert_contains_make_command(target, output, msg = nil) @@ -287,9 +281,9 @@ class Gem::TestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/helper.rb#L281 end assert scan_make_command_lines(output).any? {|line| - make = parse_make_command_line(line) + targets = parse_make_command_line_targets(line) - if make[:targets].include?(target) + if targets.include?(target) true else false -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/