Code

Git.pm: do not break inheritance
[git.git] / perl / Git.pm
index 6aab712e6ac6513b0b46958d93d536ef975276b4..ba94453781c98a97a95c65999873fc28b013340d 100644 (file)
@@ -1203,8 +1203,7 @@ either version 2, or (at your option) any later version.
 # 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.