Navigation Menu

Skip to content

Commit

Permalink
Revert "Temporary fix for .comb/.split on binary handles"
Browse files Browse the repository at this point in the history
This reverts commit 1a03efe.

See http://irclog.perlgeek.de/perl6-dev/2016-09-18#i_13230226

Since everything related to encoding is going to be refactored soon
anyway, I have no problem reverting this patch (although I think it
is the right thing to do in the end).
  • Loading branch information
lizmat committed Sep 18, 2016
1 parent 86d9e91 commit 363a3a8
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/core/IO/Handle.pm
Expand Up @@ -159,8 +159,6 @@ my class IO::Handle does IO {
multi method comb(IO::Handle:D: Int:D $size, :$close = False) {
return self.split(:$close,:COMB) if $size <= 1;

X::NYI.new(:feature("{self.^name}.comb on binary handle")).throw
if self.binary;
Seq.new(class :: does Iterator {
has Mu $!handle;
has int $!size;
Expand Down Expand Up @@ -207,8 +205,6 @@ my class IO::Handle does IO {
return self.split(:$close,:COMB)
if nqp::istype($comber,Cool) && $comber.Str.chars == 0;

X::NYI.new(:feature("{self.^name}.comb on binary handle")).throw
if self.binary;
Seq.new(class :: does Iterator {
has Mu $!handle;
has Mu $!regex;
Expand Down Expand Up @@ -304,10 +300,6 @@ my class IO::Handle does IO {
}

multi method split(IO::Handle:D: :$close = False, :$COMB) {
X::NYI.new(
:feature("{self.^name}.{$COMB ?? 'comb' !! 'split'} on binary handle")
).throw if self.binary;

Seq.new(class :: does Iterator {
has Mu $!handle;
has int $!close;
Expand Down Expand Up @@ -370,10 +362,6 @@ my class IO::Handle does IO {
return self.split(:$close,:$COMB)
if nqp::istype($splitter,Cool) && $splitter.Str.chars == 0;

X::NYI.new(
:feature("{self.^name}.{$COMB ?? 'comb' !! 'split'} on binary handle")
).throw if self.binary;

Seq.new(class :: does Iterator {
has Mu $!handle;
has Mu $!regex;
Expand Down Expand Up @@ -752,7 +740,6 @@ my class IO::Handle does IO {
!! nqp::setencoding($!PIO,
$!encoding = Rakudo::Internals.NORMALIZE_ENCODING($enc))
}
method binary() { nqp::p6bool(nqp::iseq_s($!encoding,"bin")) }

submethod DESTROY(IO::Handle:D:) {
self.close;
Expand Down

0 comments on commit 363a3a8

Please sign in to comment.