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

ruby-changes:63999

From: Nobuyoshi <ko1@a...>
Date: Mon, 7 Dec 2020 22:41:50 +0900 (JST)
Subject: [ruby-changes:63999] e025113d71 (master): rbinstall.rb: relaxed split argument

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

From e025113d71ca208255203f78cc85e9efa25bb23f Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 7 Dec 2020 22:40:46 +0900
Subject: rbinstall.rb: relaxed split argument

did_you_mean splits the output by `$/`.

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index fcc41f2..b1f657a 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -874,7 +874,7 @@ end https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L874
 def load_gemspec(file, expanded = false)
   file = File.realpath(file)
   code = File.read(file, encoding: "utf-8:-")
-  code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\(\"(?:\\.|[^\"])*\"\)/m) do
+  code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\([^\)]*\)/m) do
     files = []
     if expanded
       base = File.dirname(file)
-- 
cgit v0.10.2


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

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