Skip to content

Commit

Permalink
Make IO::Path.sibling about 2x as fast
Browse files Browse the repository at this point in the history
By using the new `cloned-with-path' method
  • Loading branch information
lizmat committed May 21, 2020
1 parent 853e622 commit a5eb1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/IO/Path.pm6
Expand Up @@ -193,8 +193,8 @@ my class IO::Path is Cool does IO {

method sibling(IO::Path:D: Str() \sibling) {
$_ := self.parts;
nqp::create(self)!SET-SELF(
$!SPEC.join(.<volume>, .<dirname>, sibling), $!SPEC, $!CWD, False)
nqp::clone(self).cloned-with-path:
$!SPEC.join(.<volume>, .<dirname>, sibling)
}

method succ(IO::Path:D:) {
Expand Down

0 comments on commit a5eb1d4

Please sign in to comment.