Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use .gist instead of prefix:<~> to stringify REPL autoprint output
Now when the return value of an expression is a type object, you get Int()
or so, and no warning
  • Loading branch information
moritz committed Sep 21, 2011
1 parent e7ed52f commit 0cbc528
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Perl6/Compiler.nqp
Expand Up @@ -16,6 +16,16 @@ class Perl6::Compiler is HLL::Compiler {
%*COMPILING<%?OPTIONS> := %options;
$super(self, |@args, |%options);
}

method autoprint($value) {
unless pir::getinterp__P().stdout_handle().tell() > $*AUTOPRINTPOS {
if pir::can($value, 'gist') {
nqp::say(nqp::unbox_s($value.gist));
} else {
nqp::say(~$value);
}
}
}
}


0 comments on commit 0cbc528

Please sign in to comment.