Skip to content

Commit 1bc760a

Browse files
mina86gitster
authored andcommitted
Git.pm: allow command_close_bidi_pipe to be called as method
The documentation of command_close_bidi_pipe() claims that it can be called as a method, but it does not check whether the first argument is $self or not assuming the latter. Using _maybe_self() fixes this. Signed-off-by: Michal Nazarewicz <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2f19ada commit 1bc760a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl/Git.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ have more complicated structure.
430430

431431
sub command_close_bidi_pipe {
432432
local $?;
433-
my ($pid, $in, $out, $ctx) = @_;
433+
my ($self, $pid, $in, $out, $ctx) = _maybe_self(@_);
434434
foreach my $fh ($in, $out) {
435435
unless (close $fh) {
436436
if ($!) {

0 commit comments

Comments
 (0)