Skip to content

Commit

Permalink
Add , fix open :rw
Browse files Browse the repository at this point in the history
  • Loading branch information
vendethiel committed Apr 17, 2014
1 parent d37353f commit 88a084e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/IO.pm
Expand Up @@ -93,7 +93,7 @@ my class IO::Handle does IO::FileTestable {
has $.path;

proto method open(|) { * }
multi method open($path? is copy, :$r, :$w, :$rw, :$a, :$p, :$bin, :$chomp = Bool::True,
multi method open($path? is copy, :$r is copy, :$w is copy, :$rw, :$a, :$p, :$bin, :$chomp = Bool::True,
:enc(:$encoding) = 'utf8') {
$path //= $!path;
$r = $w = True if $rw;
Expand Down Expand Up @@ -611,7 +611,7 @@ sub rmdir($path as Str) {
}

proto sub open(|) { * }
multi sub open($path, :$r, :$w, :$rw, :$a, :$p, :$bin, :$chomp = Bool::True, :enc(:$encoding) = 'utf8') {
multi sub open($path, :$r is copy, :$w is copy, :$rw, :$a, :$p, :$bin, :$chomp = Bool::True, :enc(:$encoding) = 'utf8') {
IO::Handle.new.open($path, :$r, :$w, :$rw, :$a, :$p, :$bin, :$chomp, :$encoding);
}

Expand Down

0 comments on commit 88a084e

Please sign in to comment.