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
Using Parrot's Digest feature on a Str coming out of Str.split works differently from a Str that doesn't in Rakudo #1397
Comments
From @masak$ cat bug # Input # Choose the right digest. # Calculate the digest. %r = box $S0 say digest('user_name=carl'.split("=")[1]); $ perl6 bug |
From @masak<moritz_> rakudo: say 'user_name=carl'.split("=")[1].PARROT |
@masak - Status changed from 'new' to 'open' |
From @moritzFixed in f87efac027edf84bff2b8578a9762ac8ab8b44ca, jnthn++ |
@moritz - Status changed from 'open' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/integration/real-strings.t commit b3197187a377336d0a0ce53ee22d1cc8b1136433 [t/spec] test for RT #70415, split() should return real strings Inline Patchdiff --git a/t/spec/integration/real-strings.t b/t/spec/integration/real-strings.t
index 5b14597..9707aee 100644
--- a/t/spec/integration/real-strings.t
+++ b/t/spec/integration/real-strings.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 11;
+plan *;
# Rakudo had a regression that
# string returned from regexes were Parrot strings, not Perl 6 strings.
@@ -20,6 +20,8 @@ plan 11;
'Still works with strings returned from split() (lives)';
is $x.trans(['a'] => ['b']), 'b',
'Still works with strings returned from split() (result)';
+ $x = 'abc'.split('b').[0];
+ is $x.trans(['a'] => ['b']), 'b', 'same for split(Str)';
}
dies_ok { for "a b c".split(/\s/) -> $foo { $foo = $foo; } }, 'variables returned from split and passed to pointy block are still ro';
@@ -56,4 +58,6 @@ is "helo".lc.trans(("aeiou" => "AEIOU")), 'hElO', '.flip.trans (RT 66300)';
is $x, +%*VM.keys, '%*VM.kv is self-consistent';
}
+done_testing;
+
# vim: ft=perl6 |
Migrated from rt.perl.org#70415 (status was 'resolved')
Searchable as RT70415$
The text was updated successfully, but these errors were encountered: