Skip to content

Commit

Permalink
Fix some spurt() related spectest glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 2, 2014
1 parent 31040e6 commit 6e8aaa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/core/IO/Handle.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ class IO::Handle does IO does PIO {
DEPRECATED('$handle.slurp-rest', |<2014.10 2015.10>);
self.slurp-rest(|c);
}
method spurt(IO::Handle:D: \what) {
DEPRECATED(".IO.spurt or spurt(...)", |<2014.10 2015.10>);
method spurt(IO::Handle:D: \what,:$nodepr) {
DEPRECATED(".IO.spurt or spurt(...)", |<2014.10 2015.10>)
unless $nodepr;
what ~~ Blob
?? self.write(what)
!! self.print(what);
Expand Down
4 changes: 2 additions & 2 deletions src/core/io_operators.pm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ multi sub slurp(IO::Handle:D $io = $*ARGFILES, :$enc, |c) {
my $result := $io.slurp-rest(:$enc,|c);
$result // $result.throw;
}
multi sub slurp(Cool:D $path, :$enc, |c) {
multi sub slurp(Any:D $path as Str, :$enc, |c) {
DEPRECATED(":encoding($enc)",|<2014.12 2015.12>,:what(":enc($enc)"))
if $enc;
my $result := SLURP-PATH(MAKE-ABSOLUTE-PATH($path,$*CWD),:$enc,|c);
Expand All @@ -181,7 +181,7 @@ multi sub spurt(IO::Handle:D $fh,\what,|c ) {
my $result := $fh.spurt(what,:nodepr,|c);
$result // $result.throw;
}
multi sub spurt(Cool:D $path,\what,:$enc,|c) {
multi sub spurt(Any:D $path as Str,\what,:$enc,|c) {
DEPRECATED(":encoding($enc)",|<2014.12 2015.12>,:what(":enc($enc)"))
if $enc;
my $result := SPURT-PATH(MAKE-ABSOLUTE-PATH($path,$*CWD),what,:$enc,|c);
Expand Down

0 comments on commit 6e8aaa2

Please sign in to comment.