From: Junio C Hamano Date: Sun, 9 Nov 2008 00:50:25 +0000 (-0800) Subject: Merge branch 'cj/maint-gitpm-fix-maybe-self' into maint X-Git-Tag: v1.6.0.4~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2819854ec5013fc0958ea477fa49d53fc0faee80?hp=8b1981d32b41f1b4e26d8d96a3c6e63b9bc746b0 Merge branch 'cj/maint-gitpm-fix-maybe-self' into maint * cj/maint-gitpm-fix-maybe-self: Git.pm: do not break inheritance --- diff --git a/perl/Git.pm b/perl/Git.pm index 6aab712e6a..ba94453781 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1203,8 +1203,7 @@ =head1 COPYRIGHT # the method was called upon an instance and (undef, @args) if # it was called directly. sub _maybe_self { - # This breaks inheritance. Oh well. - ref $_[0] eq 'Git' ? @_ : (undef, @_); + UNIVERSAL::isa($_[0], 'Git') ? @_ : (undef, @_); } # Check if the command id is something reasonable.