Skip to content

Commit

Permalink
dir() now defaults to filtering out . and ..
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jul 20, 2010
1 parent 3370f07 commit 2783660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/IO.pm
Expand Up @@ -255,13 +255,13 @@ multi sub note(*@args) {
$*ERR.say(@args);
}

multi sub dir($path as Str) {
multi sub dir($path as Str, Mu :$test = none('.', '..')) {
Q:PIR {
$P0 = find_lex '$path'
$P1 = new ['OS']
$P1 = $P1.'readdir'($P0)
%r = '&infix:<,>'($P1 :flat)
}
}.grep($test)
}
multi sub chdir($path as Str) {
Expand Down

0 comments on commit 2783660

Please sign in to comment.