From b03c1d087b00f7d8fea6001dd9e7e70fe7634e14 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 3 Jul 2018 04:43:27 +0000 Subject: fake.rb.in: duplicated RUBYOPT * template/fake.rb.in: removed duplicated options in RUBYOPT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- template/fake.rb.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'template') diff --git a/template/fake.rb.in b/template/fake.rb.in index 524f6c888d..542bc3c4ba 100644 --- a/template/fake.rb.in +++ b/template/fake.rb.in @@ -42,4 +42,9 @@ srcdir = "<%=arg['srcdir']%>" top_srcdir = File.realpath(srcdir, builddir) fake = File.join(top_srcdir, "tool/fake.rb") eval(File.read(fake), nil, fake) -ENV["RUBYOPT"] = ["-r#{__FILE__}", ENV["RUBYOPT"]].compact.join(" ") +ropt = "-r#{__FILE__}" +["RUBYOPT"].each do |flag| + opt = ENV[flag] + opt = opt ? ([ropt] | opt.split).join(" ") : ropt + ENV[flag] = opt +end -- cgit v1.2.3