rbinstall.rb: relaxed split argument

did_you_mean splits the output by `$/`.
This commit is contained in:
Nobuyoshi Nakada 2020-12-07 22:40:46 +09:00
parent 5894ea5954
commit e025113d71
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -874,7 +874,7 @@ end
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)