Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make "foo".IO.lines/words($limit) work
  • Loading branch information
lizmat committed Sep 14, 2015
1 parent 694cebf commit 65d33be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/IO/Path.pm
Expand Up @@ -507,15 +507,15 @@ my class IO::Path is Cool {
}

proto method lines(|) { * }
multi method lines(IO::Path:D: |c) {
multi method lines(IO::Path:D: $limit = *, |c) {
my $handle = self.open(|c);
$handle && $handle.lines(:close, |c);
$handle && $handle.lines($limit, :close, |c);
}

proto method words() { * }
multi method words(IO::Path:D: |c) {
multi method words(IO::Path:D: $limit = *, |c) {
my $handle = self.open(|c);
$handle && $handle.words(:close, |c);
$handle && $handle.words($limit, :close, |c);
}

my %t =
Expand Down

0 comments on commit 65d33be

Please sign in to comment.