Skip to content

Commit

Permalink
sink END phasers
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Nov 24, 2012
1 parent a060144 commit 55daa71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ sub MAIN(@ARGS) {
if nqp::can($result, 'sink') {
$result.sink();
}

# Run any END blocks before exiting.
for @*END_PHASERS { $_() }
for @*END_PHASERS {
$result := $_();
nqp::can($result, 'sink') && $result.sink();
}
}

0 comments on commit 55daa71

Please sign in to comment.