aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-03 04:43:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-03 04:43:27 +0000
commitb03c1d087b00f7d8fea6001dd9e7e70fe7634e14 (patch)
tree75d49b1302b34411aa8fbedd017c8d7288b5fcf7 /template
parent6e65c89d3dbab6d314df2996a8c40d4b196749d2 (diff)
downloadruby-b03c1d087b00f7d8fea6001dd9e7e70fe7634e14.tar.gz
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
Diffstat (limited to 'template')
-rw-r--r--template/fake.rb.in7
1 files changed, 6 insertions, 1 deletions
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