diff --git a/src/Perl6/Compiler.pir b/src/Perl6/Compiler.pir index be2eb6c2d40..8b27aab508c 100644 --- a/src/Perl6/Compiler.pir +++ b/src/Perl6/Compiler.pir @@ -128,8 +128,6 @@ Perl6::Compiler - Perl6 compiler env = root_new ['parrot';'Env'] $S0 = env['PERL6LIB'] $P0 = split ':', $S0 - # append the current directory - push $P0, '.' # append ~/.perl6/lib $S0 = env['HOME'] if $S0 goto have_home # for users of unix-y systems @@ -148,6 +146,8 @@ Perl6::Compiler - Perl6 compiler concat $S0, $S1 concat $S0, '/languages/perl6/lib' push $P0, $S0 + # append the current directory + push $P0, '.' # remove this when 'use lib' works fine # $P0 now has all the directories, move them to @*INC $P1 = new ['Parcel'] # do not use '&circumfix:<[ ]>' because it makes a list of lists diff --git a/src/core/Cool-str.pm b/src/core/Cool-str.pm index 918ec68df59..15fd0f0ca1f 100644 --- a/src/core/Cool-str.pm +++ b/src/core/Cool-str.pm @@ -209,7 +209,7 @@ augment class Cool { my $i = 1; my @r = gather while my $m = Regex::Cursor.parse(self, :rule($pat), |%opts) { my $m-copy = $m; - unless $nth.defined && ($i !~~ any |$nth) { + if !$nth.defined || ($i ~~ any |$nth) { take $m-copy; $taken++; }