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 <mina86@mina86.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michal Nazarewicz committed
Feb 7, 2013 at 15:01 UTC
1bc760aeb784701a702c0a306d464834e96b1f3d
1 file changed
+1
-1
perl/Git.pm
+1
-1
@@ -430,7 +430,7 @@ have more complicated structure.
430
431
sub command_close_bidi_pipe {
432
local $?;
433
- my ($pid, $in, $out, $ctx) = @_;
433
+ my ($self, $pid, $in, $out, $ctx) = _maybe_self(@_);
434
foreach my $fh ($in, $out) {
435
unless (close $fh) {
436
if ($!) {