Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
.starts-with is faster than .substr(0,1)
  • Loading branch information
lizmat committed Jan 13, 2016
1 parent 5410113 commit 919a3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/IO/Path.pm
Expand Up @@ -47,7 +47,7 @@ my class IO::Path is Cool {
}

method abspath() {
$!abspath //= substr($!path,0,1) eq '-'
$!abspath //= $!path.starts-with('-')
?? ''
!! $!SPEC.rel2abs($!path,$!CWD);
}
Expand Down

0 comments on commit 919a3ed

Please sign in to comment.