New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.trans is too strict in what arguments it rejects in Rakudo #2358
Comments
From @masak<masak> rakudo: my @a = 1..10; say ~(@a>>.trans((1..26) => (14..26,1..13))) For once, the whole error message is shock-full of pertinent details. |
From @masakmasak (>):
Hm, the obvious fix is the following: Inline Patchdiff --git a/src/core/Cool-str.pm b/src/core/Cool-str.pm
index b35b779..ea3601a 100644
--- a/src/core/Cool-str.pm
+++ b/src/core/Cool-str.pm
@@ -212,7 +212,7 @@ augment class Cool {
$!index = $!next_match + $/.chars;
}
- multi submethod increment_index(Str $s) {
+ multi submethod increment_index(Cool $s) {
$!index = $!next_match + $s.chars;
}
$ ./perl6 -e 'my @a = 1..10; say "!$_!" for (@a>>.trans((1..26) => That is, the first transliteration call works as expected, but the Will investigate more later. // Carl |
From @masakOh well. The original problem has been fixed. I'll open a new ticket for This ticket just need tests and then it can be closed. |
@masak - Status changed from 'new' to 'open' |
From @zhuomingliangtest added. see Raku/roast@ff620eb9c8 |
From @kylehaThere's a test in S05-transliteration/trans.t, and it passes. |
@kyleha - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#83674 (status was 'resolved')
Searchable as RT83674$
The text was updated successfully, but these errors were encountered: