summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb2
-rw-r--r--ext/purelib.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 667aad057..db2682ef9 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -348,7 +348,7 @@ $ruby << " -I'$(topdir)'"
unless CROSS_COMPILING
$ruby << " -I'$(top_srcdir)/lib'"
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
- $ruby << " -I'$(top_srcdir)/ext' -rpurelib.rb"
+ $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb"
ENV["RUBYLIB"] = "-"
ENV["RUBYOPT"] = "-rpurelib.rb"
end
diff --git a/ext/purelib.rb b/ext/purelib.rb
index 10ee06176..284254a8b 100644
--- a/ext/purelib.rb
+++ b/ext/purelib.rb
@@ -1,3 +1,3 @@
-if nul = $:.index("-")
+if nul = $:.find_index {|path| /\A(?:\.\/)*-\z/ =~ path}
$:[nul..-1] = ["."]
end