[前][次][番号順一覧][スレッド一覧]

ruby-changes:15567

From: nobu <ko1@a...>
Date: Sat, 24 Apr 2010 16:27:35 +0900 (JST)
Subject: [ruby-changes:15567] Ruby:r27473 (trunk): * tool/rbinstall.rb: expand target file name.

nobu	2010-04-24 16:27:18 +0900 (Sat, 24 Apr 2010)

  New Revision: 27473

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27473

  Log:
    * tool/rbinstall.rb: expand target file name.

  Modified files:
    trunk/ChangeLog
    trunk/tool/rbinstall.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27472)
+++ ChangeLog	(revision 27473)
@@ -1,5 +1,7 @@
-Sat Apr 24 16:20:26 2010  Nobuyoshi Nakada  <nobu@r...>
+Sat Apr 24 16:27:16 2010  Nobuyoshi Nakada  <nobu@r...>
 
+	* tool/rbinstall.rb: expand target file name.
+
 	* template/fake.rb.in: no need for hook if extmk.
 
 Sat Apr 24 14:40:20 2010  Tanaka Akira  <akr@f...>
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 27472)
+++ tool/rbinstall.rb	(revision 27473)
@@ -407,7 +407,7 @@
     next unless File.file?(src)
     next if /\/[.#]|(\.(old|bak|orig|rej|diff|patch|core)|~|\/core)$/i =~ src
 
-    name = trans[File.basename(src)]
+    name = RbConfig.expand(trans[File.basename(src)])
 
     shebang = ''
     body = ''
@@ -424,7 +424,7 @@
     open_for_install(cmd, $script_mode) do
       case $cmdtype
       when "bat"
-        [<<-"EOH".gsub(/^\s+/, ''), shebang, body, <<-"EOF".gsub(/^\s+/, '')].join.gsub(/$/, "\r")
+        [<<-"EOH".gsub(/^\s+/, ''), shebang, body, "__END__\n:endofruby\n"].join.gsub(/$/, "\r")
           @echo off
           @if not "%~d0" == "~d0" goto WinNT
           #{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
@@ -433,11 +433,8 @@
           "%~dp0#{ruby_install_name}" -x "%~f0" %*
           @goto endofruby
         EOH
-          __END__
-          :endofruby
-        EOF
       when "cmd"
-        "#{<<"/EOH"}#{shebang}#{body}"
+        <<"/EOH" << shebang << body
 @"%~dp0#{ruby_install_name}" -x "%~f0" %*
 @exit /b %ERRORLEVEL%
 /EOH

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]