From 006e8d2e71375e5a9554115bc5771447bc44ec27 Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 18 Mar 2004 10:49:20 +0000 Subject: [PATCH] * instruby.rb, rubytest.rb: do not depend on srcdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ instruby.rb | 5 +++-- rubytest.rb | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92e06c5972667b..ee06522d7f208b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 18 19:47:44 2004 WATANABE Hirofumi + + * instruby.rb, rubytest.rb: do not depend on srcdir. + Thu Mar 18 18:50:06 2004 Nobuyoshi Nakada * mkconfig.rb: no longer embed srcdir and compile_dir into diff --git a/instruby.rb b/instruby.rb index 146bb2d4f392a5..c4ab168d6b157f 100644 --- a/instruby.rb +++ b/instruby.rb @@ -3,7 +3,8 @@ load "./rbconfig.rb" include Config -$:.unshift File.join(CONFIG["srcdir"], "lib") +srcdir = File.dirname(__FILE__) +$:.unshift File.join(srcdir, "lib") require 'fileutils' require 'shellwords' require 'optparse' @@ -123,7 +124,7 @@ def with_destdir(dir) end end -Dir.chdir CONFIG["srcdir"] +Dir.chdir srcdir ruby_shebang = File.join(CONFIG["bindir"], ruby_install_name) if File::ALT_SEPARATOR diff --git a/rubytest.rb b/rubytest.rb index 6f717a2b60d441..d664bcf3aebd62 100644 --- a/rubytest.rb +++ b/rubytest.rb @@ -34,7 +34,8 @@ $stderr.reopen($stdout) error = '' -`./#{CONFIG["ruby_install_name"]}#{CONFIG["EXEEXT"]} -I#{CONFIG["srcdir"]}/lib #{CONFIG["srcdir"]}/sample/test.rb`.each do |line| +srcdir = File.dirname(__FILE__) +`./#{CONFIG["ruby_install_name"]}#{CONFIG["EXEEXT"]} -I#{srcdir}/lib #{srcdir}/sample/test.rb`.each do |line| if line =~ /^end of test/ print "test succeeded\n" exit 0