Skip to content

Commit

Permalink
Allow warningless IO::Dup.slurp (for $*IN.slurp)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Mar 9, 2015
1 parent b694705 commit 9e2c657
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/IO/Dup.pm
Expand Up @@ -23,6 +23,8 @@ class IO::Dup does IO does PIO {
self!set-PIO-attributes(:$PIO,|c);
}

multi method slurp(IO::Dup:D: |c) { self.slurp-rest(|c) }

multi method WHICH(IO::Dup:D:) { "IO::Dup($!fileno)" }
multi method Str(IO::Dup:D:) { @name[$!fileno] // "Dup#$!fileno" }

Expand Down

0 comments on commit 9e2c657

Please sign in to comment.