diff options
Diffstat (limited to 'ruby_1_8_5/runruby.rb')
-rwxr-xr-x | ruby_1_8_5/runruby.rb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/ruby_1_8_5/runruby.rb b/ruby_1_8_5/runruby.rb deleted file mode 100755 index e749441553..0000000000 --- a/ruby_1_8_5/runruby.rb +++ /dev/null @@ -1,59 +0,0 @@ -#!./miniruby - -while arg = ARGV[0] - break ARGV.shift if arg == '--' - /\A--([-\w]+)(?:=(.*))?\z/ =~ arg or break - arg, value = $1, $2 - re = Regexp.new('\A'+arg.gsub(/\w+\b/, '\&\\w*')+'\z', "i") - case - when re =~ "srcdir" - srcdir = value - when re =~ "archdir" - archdir = value - when re =~ "extout" - extout = value - else - break - end - ARGV.shift -end - -srcdir ||= File.dirname(__FILE__) -archdir ||= '.' - -abs_archdir = File.expand_path(archdir) -$:.unshift(abs_archdir) - -require 'rbconfig' -config = Config::CONFIG - -ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT']) -unless File.exist?(ruby) - abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n" -end - -libs = [abs_archdir, File.expand_path("lib", srcdir)] -if extout - abs_extout = File.expand_path(extout) - libs << abs_extout << File.expand_path(RUBY_PLATFORM, abs_extout) -end -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"] - libs |= e.split(File::PATH_SEPARATOR) -end -ENV["RUBYLIB"] = $:.replace(libs).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 |