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
Signature of .comb likely too permissive in Rakudo #1040
Comments
From @masak<masak> rakudo: say /foo/ ~~ Regex |
From @masakOn Fri Jun 05 15:27:20 2009, masak wrote:
Hm, src/builtins/any-str.pir:647 contains another likely culprit of the |
From [Unknown Contact. See original ticket]On Fri Jun 05 15:27:20 2009, masak wrote:
Hm, src/builtins/any-str.pir:647 contains another likely culprit of the |
@masak - Status changed from 'new' to 'open' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S32-str/comb.t commit 98a4c823e8c9b7c249c0350ea76a373b48e770f6 [t/spec] Test for RT #66340: .comb allows code Inline Patchdiff --git a/t/spec/S32-str/comb.t b/t/spec/S32-str/comb.t
index fffc44e..421b0f5 100644
--- a/t/spec/S32-str/comb.t
+++ b/t/spec/S32-str/comb.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 29;
+plan *;
# L<S32::Str/Str/=item comb>
@@ -79,5 +79,22 @@ is (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>,
is @l[1].to, 8, '.to of the second item is correct';
}
+# RT #66340
+{
+ my $expected_reason = rx/^'No applicable candidates '/;
+
+ try { 'RT 66340'.comb( 1 ) };
+ ok $! ~~ Exception, '.comb(1) dies';
+ ok "$!" ~~ $expected_reason, '.comb(1) dies for the expected reason';
+
+ my $calls = 0;
+ try { 'RT 66340'.comb( { $calls++ } ) };
+ #?rakudo 3 todo 'RT 66340'
+ is $calls, 0, 'code passed to .comb is not called';
+ ok $! ~~ Exception, '.comb({...}) dies';
+ ok "$!" ~~ $expected_reason, '.comb({...}) dies for the expected reason';
+}
+
+done_testing;
# vim: ft=perl6 |
From @moritzworks now, tests pass... |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#66340 (status was 'resolved')
Searchable as RT66340$
The text was updated successfully, but these errors were encountered: