summaryrefslogtreecommitdiff
path: root/runruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-07 18:26:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-07 18:26:46 +0000
commitbebc2eb8c74f9fd90eab3a254ede62f569b26690 (patch)
tree55091e8574a171322acd0caf7e3548a7c8beb70d /runruby.rb
parent807a93be080e97dafb31f4d975b6eaa991070961 (diff)
* runruby.rb: prepend LIBRUBY_SO to LD_PRELOAD as well as rubytest.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'runruby.rb')
-rwxr-xr-xrunruby.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/runruby.rb b/runruby.rb
index ca831410f0..a175dcb9aa 100755
--- a/runruby.rb
+++ b/runruby.rb
@@ -44,9 +44,14 @@ if e = ENV["RUBYLIB"]
end
ENV["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR)
-if File.file?(File.join(archdir, config['LIBRUBY_SO'])) and
- e = config['LIBPATHENV'] and !e.empty?
- ENV[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR)
+libruby_so = File.join(abs_archdir, config['LIBRUBY_SO'])
+if File.file?(libruby_so)
+ if e = config['LIBPATHENV'] and !e.empty?
+ ENV[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR)
+ end
+ if /linux/ =~ RUBY_PLATFORM
+ ENV["LD_PRELOAD"] = [libruby_so, ENV["LD_PRELOAD"]].compact.join(' ')
+ end
end
exec ruby, *ARGV