FileUtils::mktemp fix for OS X 10.6.7 and earlier

FileUtils::fu_get_gid only started doing the conversion of the group
to_s automatically from OS X 10.6.8 (ruby-1.8.7-p358) forward.

OS X 10.6.7 (ruby-1.8.7-p174) would fail in brew's FileUtils::mktemp with the
error "Error: can't convert Fixnum into String."

Fixes Homebrew/homebrew#49045
Fixes Homebrew/homebrew#49348

Closes Homebrew/homebrew#49369.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
ilovezfs 2016-02-19 20:21:55 -08:00 committed by Mike McQuaid
parent e6501c3768
commit 2517d396aa

View File

@ -22,6 +22,8 @@ module FileUtils
else
Process.gid
end
# Make OS X 10.6.7 (ruby-1.8.7-p174) and earlier happy.
group_id = group_id.to_s
begin
chown(nil, group_id, tmp)
rescue Errno::EPERM