Skip to content

Commit

Permalink
Make IO::Spec::Unix.is-absolute about 4.4x faster
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Mar 26, 2017
1 parent ae5e510 commit 4eef6db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/IO/Spec/Unix.pm
Expand Up @@ -93,8 +93,8 @@ my class IO::Spec::Unix is IO::Spec {
) ?? $io !! IO::Path.new(".");
}

method is-absolute( $file ) {
substr( $file, 0, 1 ) eq '/';
method is-absolute( Str() \path ) {
nqp::p6bool(nqp::eqat(path, '/', 0));
}

method path {
Expand Down

0 comments on commit 4eef6db

Please sign in to comment.