From fa4d39639ab3c60aff472d5c4928f6fcbd16d30b Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Fri, 31 Aug 2018 17:46:22 +0100 Subject: [PATCH] Remove unneeded .substr() candidates timotimo++ for spotting --- src/core/Cool.pm6 | 1 - src/core/Str.pm6 | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/core/Cool.pm6 b/src/core/Cool.pm6 index 49c32b746de..983463297e8 100644 --- a/src/core/Cool.pm6 +++ b/src/core/Cool.pm6 @@ -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) } diff --git a/src/core/Str.pm6 b/src/core/Str.pm6 index bbff7e6010a..0f02cf84b78 100644 --- a/src/core/Str.pm6 +++ b/src/core/Str.pm6 @@ -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)