Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
restrain IO.print and say to defined invocants; add a Mu.print
  • Loading branch information
moritz committed Oct 1, 2011
1 parent ebd4d87 commit fb48457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/IO.pm
Expand Up @@ -113,12 +113,12 @@ class IO {
nqp::p6bool(nqp::istrue($!PIO));
}

method print(*@list) {
method print(IO:D: *@list) {
$!PIO.print(nqp::unbox_s(@list.shift.Str)) while @list.gimme(1);
Bool::True
}

method say(|$) {
method say(IO:D: |$) {
my Mu $args := pir::perl6_current_args_rpa__P();
nqp::shift($args);
self.print: nqp::shift($args).gist while $args;
Expand Down
1 change: 1 addition & 0 deletions src/core/Mu.pm
Expand Up @@ -140,6 +140,7 @@ my class Mu {
method item() { self }

method say() { say(self) }
method print() { print(self) }

proto method gist(|$) { * }
multi method gist(Mu:U:) { self.HOW.name(self) ~ '()' }
Expand Down

0 comments on commit fb48457

Please sign in to comment.