Skip to content

Commit

Permalink
Make "done" a full supply citizen
Browse files Browse the repository at this point in the history
Tomorrow, Jonathan is going to give yet another installment of his latest
async presentation.  We want people to use the new goodies as soon as
possible and not have to change their async code again.  So I thought it
would be a good idea to rename supply-emit and supply-done to just "emit"
and "done".  This then interferes with the "done" from Test.pm (which I
recently deprecated).  It seemed like a good time, during this upheaval,
to at least make this work in the GLR branch.  So "done" is eradicated from
Test.pm (please use "done-testing" instead if you must: you should probably
use "plan" anyway).
  • Loading branch information
lizmat committed Aug 27, 2015
1 parent b90cac5 commit 268ca08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions lib/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -577,15 +577,6 @@ sub proclaim($cond, $desc) {
$cond;
}

sub done_testing() is export {
die "done_testing() has been renamed to done(), please change your test code";
}

sub done() is export {
DEPRECATED('done-testing',|<2015.08 2015.09>);
done-testing();
}

sub done-testing() is export {
_init_io() unless $output;
$done_testing_has_been_run = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/core/control.pm
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ sub samewith(|c) {

sub leave(|) { X::NYI.new(feature => 'leave').throw }

sub supply-emit(\value) {
sub emit(\value) {
THROW(nqp::const::CONTROL_EMIT, nqp::p6recont_ro(value));
value
}
sub supply-done() {
sub done() {
THROW(nqp::const::CONTROL_DONE, Nil);
Nil
}
Expand Down

0 comments on commit 268ca08

Please sign in to comment.