Skip to content

Commit

Permalink
* instruby.rb, rubytest.rb: do not depend on srcdir.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eban committed Mar 18, 2004
1 parent c223709 commit 006e8d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Thu Mar 18 19:47:44 2004 WATANABE Hirofumi <[email protected]>

* instruby.rb, rubytest.rb: do not depend on srcdir.

Thu Mar 18 18:50:06 2004 Nobuyoshi Nakada <[email protected]>

* mkconfig.rb: no longer embed srcdir and compile_dir into
Expand Down
5 changes: 3 additions & 2 deletions instruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion rubytest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 006e8d2

Please sign in to comment.