From d67ac15c86e14eec076acfc03a2224714a642ea7 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 30 Oct 2011 01:50:38 +0000 Subject: [PATCH] * tool/rbinstall.rb (install_recursive, bin-comm): split mere string not path name. [ruby-core:40462] [Bug #5492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ tool/rbinstall.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34904e3203..1729cd5eec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 30 10:50:36 2011 Nobuyoshi Nakada + + * tool/rbinstall.rb (install_recursive, bin-comm): split mere + string not path name. [ruby-core:40462] [Bug #5492] + Sun Oct 30 10:47:20 2011 Nobuyoshi Nakada * io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 399ca67559..6bfc73e0d1 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -241,7 +241,7 @@ def install_recursive(srcdir, dest, options = {}) if dir makedirs(d) else - makedirs(File.dirname(d)) + makedirs(d[/.*(?=\/)/m]) if block_given? yield src, d, opts else @@ -443,7 +443,7 @@ install?(:local, :comm, :bin, :'bin-comm') do trans = proc {|base| base} end install_recursive(File.join(srcdir, "bin"), bindir) do |src, cmd| - cmd = File.join(File.dirname(cmd), RbConfig.expand(trans[File.basename(cmd)])) + cmd = cmd.sub(/[^\/]*\z/m) {|n| RbConfig.expand(trans[n])} shebang = '' body = ''