Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created May 25, 2014 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/217301b3625f919aaf8d to your computer and use it in GitHub Desktop.
Save FROGGS/217301b3625f919aaf8d to your computer and use it in GitHub Desktop.
diff --git a/src/core/IO.pm b/src/core/IO.pm
index 262b8fa..5eef973 100644
--- a/src/core/IO.pm
+++ b/src/core/IO.pm
@@ -564,7 +564,7 @@ my class IO::Path is Cool does IO::FileTestable {
my $next = 1;
gather {
#?endif
-#?if jvm
+#?if !parrot
take $_.path if $_ ~~ $test for ".", "..";
#?endif
#?if !parrot
@@ -574,7 +574,8 @@ my class IO::Path is Cool does IO::FileTestable {
if nqp::isnull_s($elem) || nqp::chars($elem) == 0 {
nqp::closedir($dirh);
last;
- } else {
+ }
+ elsif $elem ne '.' | '..' {
#?endif
#?if jvm
# jvm's nextfiledir gives us absolute paths back, moar does not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment