Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add missing .spurt methods
  • Loading branch information
lizmat committed Nov 30, 2014
1 parent 0f4ec52 commit b0605fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/IO/Handle.pm
Expand Up @@ -27,6 +27,12 @@ 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>);
what ~~ Blob
?? self.write(what)
!! self.print(what);
}

# method seek(|c) {
# fail "You cannot seek on an {self.^name}";
Expand Down
1 change: 1 addition & 0 deletions src/core/IOU.pm
Expand Up @@ -22,6 +22,7 @@ my class IOU {

method open(IOU:D: |c) { open($!abspath,|c) }
method mkdir(IOU:D: |c) { mkdir($!abspath,|c) }
method spurt(IOU:D: \what, |c) { spurt($!abspath,what,|c) }

multi method Str(IOU:D:) { $!this }
multi method gist(IOU:D:) { qq|"$!this".IO| }
Expand Down

0 comments on commit b0605fc

Please sign in to comment.