<commit_before>my class IO::Pipe is IO::Handle {
    has $.proc;

    method TWEAK(:$enc, :$bin, Mu :$PIO --> Nil) {
        if $bin {
            die X::IO::BinaryAndEncoding.new if nqp::isconcrete($enc);
        }
        else {
            my $encoding = Rakudo::Internals.NORMALIZE_ENCODING($enc || 'utf-8');
            nqp::bindattr(self, IO::Handle, '$!encoding', $encoding);
            # XXX Remove next three lines after streaming decoder is in use
            nqp::bindattr(self, IO::Handle, '$!PIO', nqp::decont($PIO));
            nqp::setencoding(nqp::decont($PIO), $encoding);
            Rakudo::Internals.SET_LINE_ENDING_ON_HANDLE(nqp::decont($PIO), $.nl-in);
            my $decoder := Rakudo::Internals::VMBackedDecoder.new($encoding, :translate-nl);
            $decoder.set-line-separators($.nl-in.list);
            nqp::bindattr(self, IO::Handle, '$!decoder', $decoder);
        }
    }

    method close(IO::Pipe:D:) {
        my $PIO := nqp::getattr(nqp::decont(self), IO::Handle, '$!PIO');
        $!proc.status( nqp::closefh_i($PIO) ) if nqp::defined($PIO);
        nqp::bindattr(nqp::decont(self), IO::Handle, '$!PIO', Mu);<commit_msg>Remove old leftover line ending handling code.<commit_after>my class IO::Pipe is IO::Handle {
    has $.proc;

    method TWEAK(:$enc, :$bin, Mu :$PIO --> Nil) {
        if $bin {
            die X::IO::BinaryAndEncoding.new if nqp::isconcrete($enc);
        }
        else {
            my $encoding = Rakudo::Internals.NORMALIZE_ENCODING($enc || 'utf-8');
            nqp::bindattr(self, IO::Handle, '$!encoding', $encoding);
            nqp::bindattr(self, IO::Handle, '$!PIO', nqp::decont($PIO));
            my $decoder := Rakudo::Internals::VMBackedDecoder.new($encoding, :translate-nl);
            $decoder.set-line-separators($.nl-in.list);
            nqp::bindattr(self, IO::Handle, '$!decoder', $decoder);
        }
    }

    method close(IO::Pipe:D:) {
        my $PIO := nqp::getattr(nqp::decont(self), IO::Handle, '$!PIO');
        $!proc.status( nqp::closefh_i($PIO) ) if nqp::defined($PIO);
        nqp::bindattr(nqp::decont(self), IO::Handle, '$!PIO', Mu);
{'fraction_non_alphanumeric': 0.1931711880261927, 'fraction_numerical': 0.0009354536950420954, 'mean_word_length': 2.9104204753199268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4781614', 'n_tokens_mistral': 745, 'n_tokens_neox': 737, 'n_words': 132}