diff --git a/src/core.c/IO/Path.pm6 b/src/core.c/IO/Path.pm6 index 9d1f0153639..1093828b109 100644 --- a/src/core.c/IO/Path.pm6 +++ b/src/core.c/IO/Path.pm6 @@ -1,5 +1,3 @@ -my class Raku { ... } - my class IO::Path is Cool does IO { has IO::Spec $.SPEC; # the associated IO::Spec has Str $.CWD; # the associated CWD @@ -363,35 +361,9 @@ my class IO::Path is Cool does IO { !! $!SPEC.join($.volume, $.dirname, '') } - # secure child logic - method !child-secure(\child) { - nqp::istype((my $kid := self.add(child).resolve: :completely),Failure) - ?? $kid # kid failed - !! nqp::istype( # kid ok - (my $res-self := self.resolve: :completely), - Failure - ) - ?? $res-self # invocant failed - !! nqp::eqat( # invocant ok - $kid.absolute, - nqp::concat($res-self.absolute,$!SPEC.dir-sep), - 0 - ) - ?? $kid # kid-proper, ok! - !! Failure.new: X::IO::NotAChild.new: # not a proper kid - :path($res-self.absolute), :child($kid.absolute) - } - - proto method child(|) {*} - multi method child (IO::Path:D: \child, :$secure!) { - $secure - ?? self!child-secure(child) - !! self.add(child) - } - multi method child (IO::Path:D: \child) { - Raku.at-revision("e") - ?? self!child-secure(\child) - !! self.add(child) + method child (IO::Path:D: \child) { + nqp::clone(self).cloned-with-path: + $!SPEC.join('', $!path, child.Str) } method add (IO::Path:D: \child) { diff --git a/src/core.c/Raku.pm6 b/src/core.c/Raku.pm6 index bc764b91479..f1166cd86ed 100644 --- a/src/core.c/Raku.pm6 +++ b/src/core.c/Raku.pm6 @@ -23,18 +23,6 @@ class Raku does Systemic { !! nqp::bindkey($version-cache,$comp-ver,Version.new($comp-ver)) } } - - method revision(--> Str:D) { - nqp::substr(nqp::getcomp("Raku").language_version,2) - } - method at-revision(str $letter --> Bool:D) { - nqp::hllbool( - nqp::isge_s( - nqp::getcomp("Raku").language_version, - nqp::concat("6.",$letter) - ) - ) - } } class Perl is Raku { } # indeed :-) diff --git a/t/spectest.data.6.c b/t/spectest.data.6.c index 49a812eeb71..4a58b68079c 100644 --- a/t/spectest.data.6.c +++ b/t/spectest.data.6.c @@ -911,7 +911,6 @@ S32-hash/slice.t S32-io/IO-Socket-Async.t S32-io/IO-Socket-Async-UDP.t # moar S32-io/chdir.t -S32-io/child-secure.t S32-io/copy.t S32-io/dir.t S32-io/file-tests.t