Skip to content

Commit

Permalink
Assume Proc as return value as producing output
Browse files Browse the repository at this point in the history
Fixes #4079.  Yes, it is yet another heuristic, but a pretty simple
one.
  • Loading branch information
lizmat committed Dec 2, 2020
1 parent 1732054 commit 0d6278f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core.c/REPL.pm6
Expand Up @@ -379,7 +379,8 @@ do {
# it gets stringified, then we treat it as an error by
# falling through after all.
elsif $initial_out_position == $*OUT.tell
&& $initial_err_position == $*ERR.tell {
&& $initial_err_position == $*ERR.tell
&& nqp::not_i(nqp::istype($output,Proc)) {
if self.repl-print($output) {
@before.push: '$ = ' ~ $code.chomp ~ ";\n";
$code = '';
Expand Down

0 comments on commit 0d6278f

Please sign in to comment.