summaryrefslogtreecommitdiff
path: root/runruby.rb
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 21:37:36 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 21:37:36 +0000
commit46fa180ea0bc6fd8b6e5b3b5566a966519f63759 (patch)
tree15b757670a01b2fb99e83eed11ba30e5aaf9e45d /runruby.rb
parentd53a933fdfbc4974af43ef6812520324891c70af (diff)
merge -r 12332:12336
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'runruby.rb')
-rwxr-xr-xrunruby.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/runruby.rb b/runruby.rb
index cc04895c33..767ded6b44 100755
--- a/runruby.rb
+++ b/runruby.rb
@@ -41,7 +41,9 @@ config["bindir"] = abs_archdir
ENV["RUBY"] = File.expand_path(ruby)
ENV["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
-if 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)
@@ -56,4 +58,8 @@ if File.file?(libruby_so)
end
end
-exec ruby, *ARGV
+cmd = [ruby]
+cmd << "-rpurelib.rb" if pure
+cmd.concat(ARGV)
+cmd.unshift(*debugger) if debugger
+exec(*cmd)