Permalink
Browse files

* 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]


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@12333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 6a9b092 commit 47b588c1c7eed10a5a51df69ab95685b08311236 @nobu nobu committed May 22, 2007
Showing with 26 additions and 12 deletions.
  1. +6 −0 ChangeLog
  2. +4 −1 ext/extmk.rb
  3. +6 −0 ext/purelib.rb
  4. +3 −0 lib/mkmf.rb
  5. +4 −8 runruby.rb
  6. +3 −3 version.h
View
6 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]
+
Sat May 19 10:29:18 2007 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date/format.rb (Date._parse): detects some OFX dates
View
5 ext/extmk.rb
@@ -324,8 +324,11 @@ def $mflags.defined?(var)
$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)}
View
6 ext/purelib.rb
@@ -0,0 +1,6 @@
+if nul = $:.index("-")
+ $:[nul..-1] = ["."]
+end
+if nul = $:.index("-")
+ $:[nul..-1] = ["."]
+end
View
3 lib/mkmf.rb
@@ -1052,6 +1052,9 @@ def configuration(srcdir)
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
View
12 runruby.rb
@@ -47,7 +47,9 @@
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 @@
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)
View
6 version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2007-05-18"
+#define RUBY_RELEASE_DATE "2007-05-23"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20070518
+#define RUBY_RELEASE_CODE 20070523
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 18
+#define RUBY_RELEASE_DAY 23
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];

0 comments on commit 47b588c

Please sign in to comment.