summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xenc/make_encmake.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/enc/make_encmake.rb b/enc/make_encmake.rb
index 4be5c42888..e5ed4eb4b5 100755
--- a/enc/make_encmake.rb
+++ b/enc/make_encmake.rb
@@ -1,7 +1,11 @@
#! ./miniruby
dir = File.expand_path("../..", __FILE__)
-$:.unshift(Dir.pwd, "#{dir}/tool/lib", "#{dir}/lib")
+# The source lib directory provides the standard library for miniruby.
+# Don't add it when running with baseruby to avoid loading both
+# baseruby's cgi/escape.so and source cgi/escape.rb via erb.
+$:.unshift("#{dir}/lib") unless defined?(CROSS_COMPILING)
+$:.unshift(Dir.pwd, "#{dir}/tool/lib")
if $".grep(/mkmf/).empty?
$" << "mkmf.rb"
load File.expand_path("lib/mkmf.rb", dir)