Permalink
Browse files

fix for #1, return strings from splitpath instead of match objects

  • Loading branch information...
FROGGS committed Oct 21, 2012
1 parent e8f1063 commit 1a63e4042f3edff424c2d186cf6534f366918d36
Showing with 14 additions and 2 deletions.
  1. +2 −2 lib/File/Spec/Unix.pm
  2. +12 −0 t/02_issues.t
View
@@ -96,8 +96,8 @@ class File::Spec::Unix {
}
else {
$path ~~ m/^ ( [ .* \/ [ \.\.?$ ]? ]? ) (<-[\/]>*) /;
- $directory = $0;
- $file = $1;
+ $directory = ~$0;
+ $file = ~$1;
}
return ( $volume, $directory, $file );
View
@@ -0,0 +1,12 @@
+
+use lib 'lib';
+use Test;
+use File::Spec;
+
+plan 1;
+
+# GitHub #1
+my ( $volume, $dirs, $filename ) = File::Spec.splitpath('lib/Farabi.pm6');
+is File::Spec.catpath( $volume, $dirs, $filename ), 'lib/Farabi.pm6', 'GitHub #1';
+
+done;

0 comments on commit 1a63e40

Please sign in to comment.