Project

General

Profile

Actions

Backport #4980

closed

rbinstall.rb will not install command scripts if the path contains a hidden directory

Added by michas (Michael Schnupp) over 13 years ago. Updated over 8 years ago.

Status:
Rejected
Assignee:
-
[ruby-core:37808]

Description

I tried to compile and install ruby from a longish path containing a hidden directory somewhere in the middle of the path.

While installing the "command scripts" rbinstall.rb containts the following line:
next if //[.#]|(.(old|bak|orig|rej|diff|patch|core)|~|/core)$/i =~ src

The first part of the regex should probably only match on the basename of the file to install. But as src contains the absolute path of the file it will match all files if the path contains a hidden directory somewhere. (Which it did in my case.)

I currently pached it with a small sed-script:
sed -i 's=[.#]|=[.#][^\\\/]$|=' ruby/tool/rbinstall.rb

But the nicer solution is probably to match on the basename only.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0