summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ext/extmk.rb5
-rw-r--r--ext/purelib.rb6
-rw-r--r--lib/mkmf.rb3
-rwxr-xr-xrunruby.rb12
-rw-r--r--version.h6
6 files changed, 26 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 077ed7c6f3..f2f7fbe923 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed May 23 05:49:49 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb, ext/purelib.rb, lib/mkmf.rb, runruby.rb: clear default
+ load path to get rid of load pre-installed extensions/libraries.
+ [ruby-core:11017]
+
Tue May 22 16:37:36 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* ruby.c (set_arg0): support RSTRING_LEN on HP-UX. a patch from
diff --git a/ext/extmk.rb b/ext/extmk.rb
index f40bfa6ecf..a932a14414 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -323,8 +323,11 @@ else
$ruby = '$(topdir)/miniruby' + EXEEXT
end
$ruby << " -I'$(topdir)' -I'$(hdrdir)/lib'"
-$ruby << " -I'#{$extout}'" if $extout
+$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
+$ruby << " -I'$(hdrdir)/ext' -rpurelib.rb"
$config_h = '$(topdir)/config.h'
+ENV["RUBYLIB"] = "-"
+ENV["RUBYOPT"] = "-rpurelib.rb"
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
diff --git a/ext/purelib.rb b/ext/purelib.rb
new file mode 100644
index 0000000000..f826c5782e
--- /dev/null
+++ b/ext/purelib.rb
@@ -0,0 +1,6 @@
+if nul = $:.index("-")
+ $:[nul..-1] = ["."]
+end
+if nul = $:.index("-")
+ $:[nul..-1] = ["."]
+end
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index e243dce556..797388f591 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1059,6 +1059,9 @@ topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
}
+ if $extmk
+ mk << "RUBYLIB = -\nRUBYOPT = -rpurelib.rb\n"
+ end
if destdir = CONFIG["prefix"][$dest_prefix_pattern, 1]
mk << "\nDESTDIR = #{destdir}\n"
end
diff --git a/runruby.rb b/runruby.rb
index b1b8000389..8b0e9c20e5 100755
--- a/runruby.rb
+++ b/runruby.rb
@@ -47,7 +47,9 @@ config["bindir"] = abs_archdir
ENV["RUBY"] = File.expand_path(ruby)
ENV["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
-if !pure and e = ENV["RUBYLIB"]
+if pure
+ libs << File.expand_path("ext", srcdir) << "-"
+elsif e = ENV["RUBYLIB"]
libs |= e.split(File::PATH_SEPARATOR)
end
ENV["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR)
@@ -61,15 +63,9 @@ if File.file?(libruby_so)
ENV["LD_PRELOAD"] = [libruby_so, ENV["LD_PRELOAD"]].compact.join(' ')
end
end
-begin
- open("puretest.rb", IO::EXCL|IO::CREAT|IO::WRONLY) do |f|
- f.puts('$LOAD_PATH.replace(ENV["RUBYLIB"].split(File::PATH_SEPARATOR))')
- end
-rescue Errno::EEXIST
-end
cmd = [ruby]
-cmd << "-rpuretest.rb" if pure
+cmd << "-rpurelib.rb" if pure
cmd.concat(ARGV)
cmd.unshift(*debugger) if debugger
exec(*cmd)
diff --git a/version.h b/version.h
index ec99af4872..ed65381b26 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
-#define RUBY_RELEASE_DATE "2007-05-22"
+#define RUBY_RELEASE_DATE "2007-05-23"
#define RUBY_VERSION_CODE 190
-#define RUBY_RELEASE_CODE 20070522
+#define RUBY_RELEASE_CODE 20070523
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 22
+#define RUBY_RELEASE_DAY 23
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];