Fix TypeError with gcc compiler in deprecated MacOS

In some deprecated MacOS, e.g.10.13 High Sierra, when compiling formulae with --cc=gcc-XX, homebrew will raise "TypeError: Return value: Expected type Symbol, got type String with value".
Convert "other" string to symbol to solve this.
This commit is contained in:
Shu Niu 2023-11-06 14:08:41 +08:00 committed by GitHub
parent 2fd99da94c
commit 2809678f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,7 +348,7 @@ module SharedEnvExtension
COMPILER_SYMBOL_MAP.fetch(value) do |other| COMPILER_SYMBOL_MAP.fetch(value) do |other|
case other case other
when GNU_GCC_REGEXP when GNU_GCC_REGEXP
other other.to_sym
else else
raise "Invalid value for #{source}: #{other}" raise "Invalid value for #{source}: #{other}"
end end