Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #125457, hanenkamp++
  • Loading branch information
lizmat committed Jun 23, 2015
1 parent 75307d0 commit bcf38c9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/core/Array.pm
Expand Up @@ -91,17 +91,16 @@ class Array { # declared in BOOTSTRAP
my $items := nqp::getattr(self,List,'$!items');
my $end := self.end;

pos <= $end
?? nqp::bindpos($items, pos, nqp::null())
!! return self.default;

if pos == $end {
my $pos = pos;
my int $pos = pos;
nqp::pop($items);
nqp::pop($items)
while --$pos >= 0 && nqp::isnull(nqp::atpos($items,$pos));
}
elsif pos < $end {
nqp::bindpos($items, pos, nqp::null());
}
else {
return self.default;
while ($pos = $pos - 1) >= 0
&& nqp::isnull(nqp::atpos($items,$pos));
}
$value;
}
Expand Down

0 comments on commit bcf38c9

Please sign in to comment.