Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix REPL bug when same line issued twice.
Reported by lee_++.
  • Loading branch information
jnthn committed Jun 12, 2013
1 parent 76de8c7 commit c947f78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -302,6 +302,7 @@ role STD {
}

grammar Perl6::Grammar is HLL::Grammar does STD {
my $sc_id := 0;
method TOP() {
# Language braid.
my %*LANG;
Expand All @@ -327,7 +328,10 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
# objects that cross the compile-time/run-time boundary that are
# associated with this compilation unit.
my $file := nqp::getlexdyn('$?FILES');
my $source_id := nqp::sha1(self.target());
my $source_id := nqp::sha1(
nqp::defined(%*COMPILING<%?OPTIONS><outer_ctx>)
?? self.target() ~ $sc_id++
!! self.target());
my $*W := nqp::isnull($file) ??
Perl6::World.new(:handle($source_id)) !!
Perl6::World.new(:handle($source_id), :description($file));
Expand Down

0 comments on commit c947f78

Please sign in to comment.