Skip to content

Commit 0313f4c

Browse files
committed
* instruby.rb (with_destdir): should return the given argument if no
DESTDIR is given. * instruby.rb: use path name expansion of cmd.exe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 8e5870d commit 0313f4c

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

ChangeLog

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Wed Feb 25 21:16:25 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* instruby.rb (with_destdir): should return the given argument if no
4+
DESTDIR is given.
5+
6+
* instruby.rb: use path name expansion of cmd.exe.
7+
18
Wed Feb 25 09:35:22 2004 NAKAMURA Usaku <usa@ruby-lang.org>
29

310
* error.c (NameError::Message): new class for lazy evaluation of
@@ -9,7 +16,7 @@ Wed Feb 25 09:35:22 2004 NAKAMURA Usaku <usa@ruby-lang.org>
916

1017
Tue Feb 24 18:59:37 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
1118

12-
* dir.c (glob_helper): '**/' should not match leading period
19+
* dir.c (glob_helper): '**/' should not match leading period
1320
unless File::FNM_DOTMATCH is set. (like '*/') [ruby-dev:23014]
1421

1522
Tue Feb 24 13:22:21 2004 Dave Thomas <dave@pragprog.com>
@@ -26,12 +33,12 @@ Tue Feb 24 07:23:30 2004 Dave Thomas <dave@pragprog.com>
2633

2734
Tue Feb 24 06:40:14 2004 Dave Thomas <dave@pragprog.com>
2835

29-
* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle
36+
* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle
3037
class variables in code listings
3138

3239
Tue Feb 24 06:40:14 2004 Dave Thomas <dave@pragprog.com>
3340

34-
* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle
41+
* lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle
3542
class variables in code listings
3643

3744
Tue Feb 24 06:32:27 2004 Dave Thomas <dave@pragprog.com>
@@ -46,7 +53,7 @@ Tue Feb 24 06:16:22 2004 Dave Thomas <dave@pragprog.com>
4653

4754
Tue Feb 24 06:08:47 2004 Dave Thomas <dave@pragprog.com>
4855

49-
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant):
56+
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant):
5057
Start collecting text of constant values earlier: was missing
5158
values in output if there was no space after '='
5259

instruby.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def makedirs(dirs)
7272
end
7373

7474
def with_destdir(dir)
75+
return dir if $destdir.empty?
7576
dir = dir.sub(/\A\w:/, '') if File::PATH_SEPARATOR == ';'
7677
$destdir + dir
7778
end
@@ -155,11 +156,11 @@ def with_destdir(dir)
155156
open(with_destdir(batfile), "w") { |b|
156157
b.print <<EOH, shebang, body, <<EOF
157158
@echo off
158-
if "%OS%" == "Windows_NT" goto WinNT
159+
if not "%~d0" == "~d0" goto WinNT
159160
#{ruby_bin_dosish} -x "#{batfile}" %1 %2 %3 %4 %5 %6 %7 %8 %9
160161
goto endofruby
161162
:WinNT
162-
#{ruby_bin_dosish} -x "#{batfile}" %*
163+
"%~dp0#{ruby_install_name}" -x "%~f0" %*
163164
goto endofruby
164165
EOH
165166
__END__

0 commit comments

Comments
 (0)