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

ruby-changes:41764

From: nobu <ko1@a...>
Date: Tue, 16 Feb 2016 02:49:46 +0900 (JST)
Subject: [ruby-changes:41764] nobu:r53838 (trunk): rbinstall.rb: drive letter in without_destdir

nobu	2016-02-16 02:50:08 +0900 (Tue, 16 Feb 2016)

  New Revision: 53838

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

  Log:
    rbinstall.rb: drive letter in without_destdir
    
    * tool/rbinstall.rb (without_destdir): compare with the destdir
      after stripping a drive letter, on dosish platforms.
      pointed out by @DavidEGrayson.
      https://github.com/ruby/ruby/commit/d0cf23b#commitcomment-16100407

  Modified files:
    trunk/ChangeLog
    trunk/tool/rbinstall.rb
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 53837)
+++ tool/rbinstall.rb	(revision 53838)
@@ -281,9 +281,9 @@ def with_destdir(dir) https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L281
 end
 
 def without_destdir(dir)
-  return dir if !$destdir or $destdir.empty? or !dir.start_with?($destdir)
+  return dir if !$destdir or $destdir.empty?
   dir = dir.sub(/\A\w:/, '') if File::PATH_SEPARATOR == ';'
-  dir[$destdir.size..-1]
+  dir.start_with?($destdir) ? dir[$destdir.size..-1] : dir
 end
 
 def prepare(mesg, basedir, subdirs=nil)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53837)
+++ ChangeLog	(revision 53838)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Feb 16 02:49:41 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* tool/rbinstall.rb (without_destdir): compare with the destdir
+	  after stripping a drive letter, on dosish platforms.
+	  pointed out by @DavidEGrayson.
+	  https://github.com/ruby/ruby/commit/d0cf23b#commitcomment-16100407
+
 Mon Feb 15 15:44:09 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (parse_ident): allow keyword arguments just after a

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

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