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

ruby-changes:48057

From: nobu <ko1@a...>
Date: Thu, 12 Oct 2017 16:27:20 +0900 (JST)
Subject: [ruby-changes:48057] nobu:r60171 (trunk): rbinstall.rb: shell code as comments

nobu	2017-10-12 16:27:16 +0900 (Thu, 12 Oct 2017)

  New Revision: 60171

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60171

  Log:
    rbinstall.rb: shell code as comments
    
    * tool/rbinstall.rb (PROLOG_SCRIPT): wrap shell code by
      =begin/=end as comments.  [ruby-core:83202] [Bug#13997]

  Modified files:
    trunk/tool/rbinstall.rb
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 60170)
+++ tool/rbinstall.rb	(revision 60171)
@@ -429,6 +429,7 @@ end https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L429
 if load_relative or /\s/ =~ bindir
   PROLOG_SCRIPT = <<EOS
 #!/bin/sh\n# -*- ruby -*-
+_=_\\\n=begin
 bindir="#{load_relative ? '${0%/*}' : bindir.gsub(/\"/, '\\\\"')}"
 EOS
   if CONFIG["LIBRUBY_RELATIVE"] != 'yes' and libpathenv = CONFIG["LIBPATHENV"]
@@ -438,7 +439,7 @@ libdir="#{load_relative ? '${bindir%/bin https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L439
 export #{libpathenv}="$libdir${#{libpathenv}:+#{pathsep}$#{libpathenv}}"
 EOS
   end
-  PROLOG_SCRIPT << %Q[exec "$bindir/#{ruby_install_name}" -x "$0" "$@"\n]
+  PROLOG_SCRIPT << %Q[exec "$bindir/#{ruby_install_name}" "-x" "$0" "$@"\n=end\n]
 else
   PROLOG_SCRIPT = nil
 end

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

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