Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Insert a semicolon when we are in moreinput but get nothing.
  • Loading branch information
peschwa committed Mar 31, 2015
1 parent c5f2d09 commit 459a0cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Perl6/Compiler.nqp
Expand Up @@ -50,11 +50,13 @@ class Perl6::Compiler is HLL::Compiler {
method interactive(*%adverbs) {
my $*moreinput := sub ($cursor) {
my str $more := nqp::readlineintfh(nqp::getstdin, '* ');
if nqp::isnull_s($more) {
$more := '';
if nqp::isnull_s($more) || $more eq '' {
$more := ';';
}

$cursor."!APPEND_TO_ORIG"($more);
}

my $super := nqp::findmethod(HLL::Compiler, 'interactive');
$super(self, |%adverbs);
}
Expand Down

0 comments on commit 459a0cc

Please sign in to comment.