Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #262 from Nami-Doc/patch-2
Implement IO.read :rw as specced
  • Loading branch information
FROGGS committed Apr 16, 2014
2 parents f1f30d2 + e572536 commit 0c11bcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/IO.pm
Expand Up @@ -93,9 +93,10 @@ my class IO::Handle does IO::FileTestable {
has $.path;

proto method open(|) { * }
multi method open($path? is copy, :$r, :$w, :$a, :$p, :$bin, :$chomp = Bool::True,
multi method open($path? is copy, :$r, :$w, :$rw, :$a, :$p, :$bin, :$chomp = Bool::True,
:enc(:$encoding) = 'utf8') {
$path //= $!path;
$r = $w = True if $rw;
my $abspath = defined($*CWD) ?? IO::Spec.rel2abs($path) !! $path;
#?if parrot
my $mode = $p ?? ($w || $a ?? 'wp' !! 'rp') !!
Expand Down

0 comments on commit 0c11bcb

Please sign in to comment.