From: Junio C Hamano Date: Mon, 3 Nov 2008 00:36:21 +0000 (-0800) Subject: Merge branch 'cj/maint-gitpm-fix-maybe-self' X-Git-Tag: v1.6.1-rc1~98 X-Git-Url: https://www.git.lorimer.id.au/gitweb.git/diff_plain/bfd59c493d2be76adbc281df15a20aae766128fc?hp=6a509a6f7f38906996ac791449d5bcc2f32eef23 Merge branch 'cj/maint-gitpm-fix-maybe-self' * 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.