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
Match objects are mutable in Rakudo, and after they're changed .perl breaks #991
Comments
From @masak<masak> rakudo: my $m = "foo" ~~ /foo/; $m<greeting> = "OH HAI"; say $m.perl |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S05-match/perl.t commit d8c325d9592aca0455d8d0ecd54e9ee51a3a08dd [t/spec] Test for RT #65610 Inline Patchdiff --git a/t/spec/S05-match/perl.t b/t/spec/S05-match/perl.t
index 6f96d0d..0d1af92 100644
--- a/t/spec/S05-match/perl.t
+++ b/t/spec/S05-match/perl.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 11;
+plan 13;
# tests for Match.perl
@@ -39,4 +39,14 @@ lives_ok { $/.perl }, 'lives on quantified named captures';
is_deeply eval($/.perl), $/, 'eval of Match.perl recreates Match';
}
+# RT #65610
+{
+ my $m = 'foo' ~~ /foo/;
+ eval '$m<greeting> = "OH HAI"';
+
+ #?rakudo 2 todo 'RT #65610'
+ ok $! ~~ Exception, 'die before modifying a Match';
+ lives_ok { $m.perl }, 'can .perl a Match after attempt to modify';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzThe first test now passes, the second still blocks on the output not |
@moritz - Status changed from 'open' to 'resolved' |
From @pmichaudS02 shows Match objects as being mutable, so I've removed the test(s) Pm |
Migrated from rt.perl.org#65610 (status was 'resolved')
Searchable as RT65610$
The text was updated successfully, but these errors were encountered: