Bug #15664
closed
Unlike Unix, Windows doesn't support execute permissions separately. If the path is a regular file, Ruby currently uses file extensions to determine if a file is executable, and only considers the following extensions as executable: .bat
, .cmd
, .com
, .exe
. See https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L5598-L5602
I don't think this is fixable unless we want to make File.executable?
an alias to File.readable?
on Windows, and that would just result in the opposite issue, with File.executable?
returning true
for files that are just readable and not actually executable.
The documentation for File.executable
and File.executable_real?
does not currently reflect the issues on Windows. Attached is a documentation patch to explain the behavior. I plan to commit this in about a week unless I hear objections.
I agree on the documentation fix, but I guess that Gem.bin_path
should return the proper stub file path in this case.
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0