Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hopefully fix pand install p6doc issues
  • Loading branch information
lizmat committed Oct 23, 2015
1 parent 0bbd62b commit ca1cf74
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/core/Cool.pm
Expand Up @@ -262,11 +262,10 @@ my class Cool { # declared in BOOTSTRAP
$i < 0 ?? Nil !! nqp::box_i($i,Int);
}

proto method split(|) {*}
multi method split(Regex $pat, $limit = Inf;; :$all) {
multi method split(Cool: Regex:D $pat, $limit = Inf;; :$all) {
self.Stringy.split($pat, $limit, :$all);
}
multi method split(Cool $pat, $limit = Inf;; :$all) {
multi method split(Cool: Cool:D $pat, $limit = Inf;; :$all) {
self.Stringy.split($pat.Stringy, $limit, :$all);
}
proto method match(|) {*}
Expand Down
1 change: 0 additions & 1 deletion src/core/IO/Handle.pm
Expand Up @@ -137,7 +137,6 @@ my class IO::Handle does IO {
$c;
}

proto method split(|) { * }
multi method split(IO::Handle:D: :$close, :$COMB) {
X::NYI.new(feature => "'split' without closing the file handle").throw
if !$close;
Expand Down
1 change: 0 additions & 1 deletion src/core/IO/Path.pm
Expand Up @@ -513,7 +513,6 @@ my class IO::Path is Cool {
$handle && $handle.lines(:close);
}

proto method split(|) { * }
multi method split(IO::Path:D: Str:D $splitter = "", |c) {
my $handle = self.open(|c);
$handle && $handle.split($splitter, :close);
Expand Down
2 changes: 1 addition & 1 deletion src/core/IO/Spec/Cygwin.pm
Expand Up @@ -53,7 +53,7 @@ my class IO::Spec::Cygwin is IO::Spec::Unix {
method catpath(|c) {
IO::Spec::Win32.catpath(|c).subst(:global, '\\', '/');
}
method split($path) {
multi method split(IO::Spec::Cygwin: Cool:D $path) {
IO::Spec::Win32.split($path).map(
{ (.key => .value.subst(:global, '\\', '/')) }
);
Expand Down
2 changes: 1 addition & 1 deletion src/core/IO/Spec/Unix.pm
Expand Up @@ -77,7 +77,7 @@ my class IO::Spec::Unix is IO::Spec {
}
}

method split (Cool:D $path is copy ) {
multi method split(IO::Spec::Unix: Cool:D $path is copy ) {
$path ~~ s/<?after .> '/'+ $ //;

$path ~~ m/^ ( [ .* \/ ]? ) (<-[\/]>*) /;
Expand Down
2 changes: 1 addition & 1 deletion src/core/IO/Spec/Win32.pm
Expand Up @@ -65,7 +65,7 @@ my class IO::Spec::Win32 is IO::Spec::Unix {
so $path ~~ /^ [ <$driveletter> <$slash> | <$slash> | <$UNCpath> ]/
}

method split (Str() $path is copy) {
multi method split(IO::Spec::Win32: Cool:D $path is copy) {
$path ~~ s[ <$slash>+ $] = '' #=
unless $path ~~ /^ <$driveletter>? <$slash>+ $/;

Expand Down
2 changes: 2 additions & 0 deletions src/core/Mu.pm
Expand Up @@ -44,6 +44,8 @@ Please refactor this code using the new Iterator / Seq interface.
)
}

proto method split(|) { * }

method take {
take self;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/Str.pm
Expand Up @@ -738,7 +738,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}.new(self));
}

multi method split(Str:D: Regex $pat, $limit = *;; :$all) {
multi method split(Str:D: Regex:D $pat, $limit = *;; :$all) {
return ().list
if nqp::istype($limit,Numeric) && $limit <= 0;
my \matches = nqp::istype($limit, Whatever)
Expand Down Expand Up @@ -767,7 +767,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
}
}

multi method split(Str:D: Cool $delimiter, $limit = *;; :$all) {
multi method split(Str:D: Cool:D $delimiter, $limit = *;; :$all) {
my $delim-str = $delimiter.Str;
my str $self-string = self;
my str $match-string = $delim-str;
Expand Down

0 comments on commit ca1cf74

Please sign in to comment.