From 5cedb75a620bcdaefd96fae9c29cdf6ec76c8711 Mon Sep 17 00:00:00 2001 From: Milo Lee Date: Fri, 8 Oct 2021 01:50:53 +0800 Subject: [PATCH] Handle the case superclass is a subclass of Formula --- Library/Homebrew/cmd/info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index cff34530b..021f48f42 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -240,7 +240,7 @@ module Homebrew def github_info(f) return f.path if f.tap.blank? || f.tap.remote.blank? - path = if f.class.superclass == Formula + path = if f.is_a?(Formula) f.path.relative_path_from(f.tap.path) elsif f.is_a?(Cask::Cask) f.sourcefile_path.relative_path_from(f.tap.path)