You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
commit dfb563af782fb93935e1dc74a8dbd512d25b626f
Author: Elizabeth Mattijsen <[email protected]>
Date: Fri Nov 8 15:48:54 2019 +0100
Allow for 1 positional arg .subst
Not specifying a replacement means the empty string, aka, removing
the matched string(s). Wonder why we didn't think about that before.
diff --git a/src/core.c/Cool.pm6 b/src/core.c/Cool.pm6
index 098321054..30409abe1 100644
--- a/src/core.c/Cool.pm6
+++ b/src/core.c/Cool.pm6
@@ -322,7 +322,7 @@ my class Cool { # declared in BOOTSTRAP
$/ := nqp::getlexcaller('$/');
{*}
}
- multi method subst(Cool:D: $original, $replacement, *%options) {
+ multi method subst(Cool:D: $original, $replacement = "", *%options) {
$/ := nqp::getlexcaller('$/');
self.Stringy.subst($original, $replacement, |%options);
}
this commit added the ability to use subst without a second argument to get "" as default. This is only used in test code, so I'm just going to make it backwards compatible I think.
Im trying to install this module on Ubuntu version 20 and getting the following error. Any help would be appreciated.
:~/ronin/raku$ zef install https://github.com/timo/json_fast.git
===> Testing: JSON::Fast:ver<0.17>:authcpan:TIMOTIMO
[JSON::Fast] Cannot resolve caller subst(Str:D: Str:D, :global); none of these signatures match:
[JSON::Fast] (Str:D: Str:D $original, Str:D $final, *%options)
[JSON::Fast] (Str:D: $matcher, $replacement, *%options)
[JSON::Fast] in block at t/13-scopes.t line 6
===> Testing [FAIL]: JSON::Fast:ver<0.17>:authcpan:TIMOTIMO
Aborting due to test failure: JSON::Fast:ver<0.17>:authcpan:TIMOTIMO (use --force-test to override)
The text was updated successfully, but these errors were encountered: