[前][次][番号順一覧][スレッド一覧]

ruby-changes:62387

From: Nobuyoshi <ko1@a...>
Date: Fri, 24 Jul 2020 11:11:12 +0900 (JST)
Subject: [ruby-changes:62387] ba99eae2a5 (master): [ruby/optparse] Fix ls-files matching regexp

https://git.ruby-lang.org/ruby.git/commit/?id=ba99eae2a5

From ba99eae2a596658a71079975fb7d53ae1f2341a5 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 23 Jul 2020 18:31:23 +0900
Subject: [ruby/optparse] Fix ls-files matching regexp

As splitting by NUL means to allow the file names to contain
newlines, path names should match at beginning-of-string instead
of beginning-of-line.

https://github.com/ruby/optparse/commit/df3933aa2b

diff --git a/lib/optparse/optparse.gemspec b/lib/optparse/optparse.gemspec
index d67060a..25f81c0 100644
--- a/lib/optparse/optparse.gemspec
+++ b/lib/optparse/optparse.gemspec
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec| https://github.com/ruby/ruby/blob/trunk/lib/optparse/optparse.gemspec#L21
   spec.metadata["source_code_uri"] = spec.homepage
 
   spec.files         = Dir.chdir(File.expand_path('..', __FILE__)) do
-    `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+    `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
   end
   spec.bindir        = "exe"
-  spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+  spec.executables   = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
   spec.require_paths = ["lib"]
 end
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]