Skip to content

Commit

Permalink
Remove unneeded .substr() candidates
Browse files Browse the repository at this point in the history
timotimo++ for spotting
  • Loading branch information
lizmat committed Aug 31, 2018
1 parent 607ac15 commit fa4d396
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/core/Cool.pm6
Expand Up @@ -151,7 +151,6 @@ my class Cool { # declared in BOOTSTRAP
}

proto method substr(|) {*}
multi method substr() { self.Str.substr }
multi method substr(\from) { self.Str.substr(from) }
multi method substr(\from, \chars) { self.Str.substr(from,chars) }

Expand Down
3 changes: 0 additions & 3 deletions src/core/Str.pm6
Expand Up @@ -2706,9 +2706,6 @@ my class Str does Stringy { # declared in BOOTSTRAP
}).join;
}

multi method substr(Str:D:) {
die "Must at least specify a 'from' value with 'substr'"
}
multi method substr(Str:D: Int:D \start) {
nqp::if(
nqp::islt_i((my int $from = nqp::unbox_i(start)),0)
Expand Down

0 comments on commit fa4d396

Please sign in to comment.