<commit_before>use v6;
use Test;
plan 7;

{
    sub count(@a) {
        my $x = 0;
        $x++ for @a;
        return $x;
    }

    is count([1, 2, 3, 4]),       1, 'count([1, 2, 3, 4])';
    #?rakudo skip 'temporary skip while adjusting ObjectRef'
    is count(my @b = 1, 2, 3, 4), 4, 'count(my @b = 1, 2, 3)';
    is count((1, 2, 3)),          3, 'count((1, 2, 3))';

    sub count2($a) {
        my $x = 0;
        $x++ for $a;
        return $x;
    }

    #?rakudo skip "not handling scalars being passed lists correctly"
    is count2((1,2,3)),           1, 'count2((1,2,3))';
}

{
    sub pa(@a) { @a.WHAT; }
    my @b = 2, 3;
    is pa(@b), 'Array', 'basic array type sanity';
    #?rakudo todo 'RT #61172'
    dies_ok { pa(3) }, 'non-slurpy array does not take a single Int';

    sub ph(%h) { 1 }
    dies_ok { ph(3) }, 'an Int is not a Hash';

}<commit_msg>[t/spec]: Fix/unfudge tests in passing-arrays.t .<commit_after>use v6;
use Test;
plan 7;

{
    sub count(@a) {
        my $x = 0;
        $x++ for @a;
        return $x;
    }

    is count([1, 2, 3, 4]),       4, 'count([1, 2, 3, 4])';
    is count(my @b = 1, 2, 3, 4), 4, 'count(my @b = 1, 2, 3)';
    is count((1, 2, 3)),          3, 'count((1, 2, 3))';

    sub count2($a) {
        my $x = 0;
        $x++ for $a;
        return $x;
    }

    is count2((1,2,3)),           1, 'count2((1,2,3))';
}

{
    sub pa(@a) { @a.WHAT; }
    my @b = 2, 3;
    is pa(@b), 'Array', 'basic array type sanity';
    dies_ok { pa(3) }, 'non-slurpy array does not take a single Int';

    sub ph(%h) { 1 }
    dies_ok { ph(3) }, 'an Int is not a Hash';

}
{'fraction_non_alphanumeric': 0.20495356037151702, 'fraction_numerical': 0.056346749226006194, 'mean_word_length': 1.9328493647912885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1659555', 'n_tokens_mistral': 742, 'n_tokens_neox': 671, 'n_words': 217}