Index: lib/Parrot/IO/Directory.pm =================================================================== --- lib/Parrot/IO/Directory.pm (revision 10434) +++ lib/Parrot/IO/Directory.pm (working copy) @@ -161,7 +161,13 @@ $path = $path->path if ref $path; - return File::Spec->abs2rel($path, $self->path); + my $rel_path = File::Spec->abs2rel($path, $self->path); + + # some (all?) versions of File::Spec->abs2rel() prior to 3.13 return '' + # instead of '.' to indicate the current working directory. In order to be + # compatible with both pre/post version 3.13 we're normalizing the current + # working dir to be '.'. + return ($rel_path eq '') ? '.' : $rel_path; } =item C Index: t/perl/Parrot_IO.t =================================================================== --- t/perl/Parrot_IO.t (revision 10434) +++ t/perl/Parrot_IO.t (working copy) @@ -97,7 +97,7 @@ ok($f1 && $f2, 'file_with_name'); # Relative paths. -is($d->relative_path($d->path), '', 'relative_path same dir'); +is($d->relative_path($d->path), curdir(), 'relative_path same dir'); is($d1->relative_path($f1->path), 'file1.txt', 'relative_path same file'); is($d->relative_path($d1->path), 'one', 'relative_path down to dir'); is($d->relative_path($f1->path), catfile(qw(one file1.txt)),