aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-15 17:50:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-15 17:50:08 +0000
commitaa7233f7ebdae8ff9863f5c9bc99d630704a529b (patch)
tree538c0535e314467d752bbcef0a14a84bb2d97dae
parent71c3724bfa891249fdb1f5e46912850c0bac0d50 (diff)
downloadruby-aa7233f7ebdae8ff9863f5c9bc99d630704a529b.tar.gz
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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rwxr-xr-xtool/rbinstall.rb4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 71883d54e6..9eb3a87b9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 16 02:49:41 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* parse.y (parse_ident): allow keyword arguments just after a
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 4614c3538a..1cca55d919 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -281,9 +281,9 @@ def with_destdir(dir)
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)