Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created December 13, 2016 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/bf7c5a84c4d82854f95b8347901982fd to your computer and use it in GitHub Desktop.
Save zoffixznet/bf7c5a84c4d82854f95b8347901982fd to your computer and use it in GitHub Desktop.
diff --git a/src/core/Supply.pm b/src/core/Supply.pm
index aa8b760..b8bcedc 100644
--- a/src/core/Supply.pm
+++ b/src/core/Supply.pm
@@ -1672,7 +1672,12 @@ sub SUPPLY(&block) {
method tap(&emit, &done, &quit) {
my $state = SupplyBlockState.new(:&emit, :&done, :&quit);
self!run-supply-code(&!block, $state);
- $state.close-phasers.push(.clone) for &!block.phasers('CLOSE');
+ dd ['here!', nqp::istype(&!block, Block) ];
+ &!block();
+ dd "done!";
+ if nqp::istype(&!block, Block) {
+ $state.close-phasers.push(.clone) for &!block.?phasers('CLOSE');
+ }
self!deactivate-one($state);
Tap.new(-> { self!teardown($state) })
}
cpan@perlbuild2~/CPANPRC/rakudo (nom)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment