Git.pm: do not break inheritance
Make it possible to write subclasses of Git.pm Signed-off-by: Christian Jaeger <christian@jaeger.mine.nu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Jaeger committed
Oct 18, 2008 at 20:25 UTC
d8b24b930f5b7150e63d989de39eb71bd37e8e63
1 file changed
+1
-2
perl/Git.pm
+1
-2
@@ -1203,8 +1203,7 @@ either version 2, or (at your option) any later version.
1203
# the method was called upon an instance and (undef, @args) if
1204
# it was called directly.
1205
sub _maybe_self {
1206
- # This breaks inheritance. Oh well.
1207
- ref $_[0] eq 'Git' ? @_ : (undef, @_);
1206
+ UNIVERSAL::isa($_[0], 'Git') ? @_ : (undef, @_);
1207
}
1208
1209
# Check if the command id is something reasonable.