Skip to content

Commit

Permalink
A tiny bit of IO portability stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed May 14, 2013
1 parent a4ef060 commit e4b2d65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/IO.pm
Expand Up @@ -102,13 +102,13 @@ my class IO::Handle does IO::FileTestable {
);
$!path = $path;
$!chomp = $chomp;
$!PIO.encoding($bin ?? 'binary' !! PARROT_ENCODING($encoding));
nqp::setencoding($!PIO, $bin ?? 'binary' !! PARROT_ENCODING($encoding));
self;
}

method close() {
# TODO:b catch errors
$!PIO.close;
nqp::closefh($!PIO);
Bool::True;
}

Expand Down Expand Up @@ -190,11 +190,11 @@ my class IO::Handle does IO::FileTestable {

proto method print(|) { * }
multi method print(IO::Handle:D: Str:D $value) {
$!PIO.print(nqp::unbox_s($value));
nqp::printfh($!PIO, nqp::unbox_s($value));
Bool::True
}
multi method print(IO::Handle:D: *@list) {
$!PIO.print(nqp::unbox_s(@list.shift.Str)) while @list.gimme(1);
nqp::printfh($!PIO, nqp::unbox_s(@list.shift.Str)) while @list.gimme(1);
Bool::True
}

Expand Down

0 comments on commit e4b2d65

Please sign in to comment.