Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PIO.say should return True, not 1
  • Loading branch information
lizmat committed Nov 30, 2014
1 parent dd6fc0a commit 0f4ec52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/PIO.pm
Expand Up @@ -372,18 +372,19 @@ my role PIO {
proto method print(|) { * }
multi method print(PIO:D: Str:D \x) {
nqp::printfh($!PIO, nqp::unbox_s(x));
Bool::True
Bool::True;
}
multi method print(PIO:D: *@list) {
nqp::printfh($!PIO, nqp::unbox_s(@list.shift.Str)) while @list.gimme(1);
Bool::True
Bool::True;
}

multi method say(PIO:D: |) {
my Mu $args := nqp::p6argvmarray();
nqp::shift($args); # lose the object
nqp::printfh($!PIO, nqp::unbox_s(nqp::shift($args).gist)) while $args;
nqp::printfh($!PIO, nqp::unbox_s("\n"));
Bool::True;
}

method slurp-rest(PIO:D: :$bin,:$encoding,:$enc) {
Expand Down

0 comments on commit 0f4ec52

Please sign in to comment.