class MiniPortile
def detect_host
def detect_host return @detect_host if defined?(@detect_host) begin ENV["LC_ALL"], old_lc_all = "C", ENV["LC_ALL"] output = `#{gcc_cmd} -v 2>&1` if m = output.match(/^Target\: (.*)$/) @detect_host = m[1] else @detect_host = nil end @detect_host ensure ENV["LC_ALL"] = old_lc_all end end