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

ruby-changes:34510

From: nobu <ko1@a...>
Date: Sat, 28 Jun 2014 07:53:00 +0900 (JST)
Subject: [ruby-changes:34510] nobu:r46591 (trunk): mkconfig.rb: fix empty prefix

nobu	2014-06-28 07:52:46 +0900 (Sat, 28 Jun 2014)

  New Revision: 46591

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

  Log:
    mkconfig.rb: fix empty prefix
    
    * tool/mkconfig.rb: vars["prefix"] may not set.  [fix GH-643]

  Modified files:
    trunk/tool/mkconfig.rb
Index: tool/mkconfig.rb
===================================================================
--- tool/mkconfig.rb	(revision 46590)
+++ tool/mkconfig.rb	(revision 46591)
@@ -167,8 +167,8 @@ def vars.expand(val, config = self) https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L167
   val.replace(newval) unless newval == val
   val
 end
-prefix = vars.expand(vars["prefix"])
-rubyarchdir = vars.expand(vars["rubyarchdir"])
+prefix = vars.expand(vars["prefix"] ||= "")
+rubyarchdir = vars.expand(vars["rubyarchdir"] ||= "")
 relative_archdir = rubyarchdir.rindex(prefix, 0) ? rubyarchdir[prefix.size..-1] : rubyarchdir
 print "  TOPDIR = File.dirname(__FILE__).chomp!(#{relative_archdir.dump})\n"
 print "  DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"

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

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