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
Trouble mixing match objects and ranges #1171
Comments
From @colomonRakudo commit version: 241545b9d6c73f95bd8e5255187c30d5e77e6381 Test code written by KyleHa++: my $range; Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I' (This is on OS X, but probably universal.) -- |
From @moritzWorks now, tests pass, happiness spreads over the world. |
The RT System itself - Status changed from 'new' to 'open' |
@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/S03-operators/range.t commit 6a8a76abd5ba1ae9227b37b434aaa4eccb5fa75b [t/spec] unfudge tests for RT #67882, and add a few more (because I did not see the existing tests early enough) Inline Patchdiff --git a/t/spec/S03-operators/range.t b/t/spec/S03-operators/range.t
index d80a290..7124829 100644
--- a/t/spec/S03-operators/range.t
+++ b/t/spec/S03-operators/range.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 107;
+plan 110;
# L<S03/Nonchaining binary precedence/Range object constructor>
@@ -159,7 +159,6 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
}
# RT #67882
-#?rakudo skip "Does not automatically turn match objects into strings / numbers"
{
my $range;
lives_ok { '1 3' ~~ /(\d+) \s (\d+)/; $range = $0..$1 },
@@ -169,6 +168,13 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
lives_ok { "$range" }, 'can stringify range';
is ~$range, "1 2 3", 'range is correct';
}
+# and another set, just for the lulz
+# RT #67882
+{
+ ok '1 3' ~~ /(\d) . (\d)/, 'regex sanity';
+ isa_ok $0..$1, Range, '$0..$1 constructs a Range';
+ is ($0..$1).join('|'), '1|2|3', 'range from $0..$1';
+}
{
my $range;
lives_ok { '1 3' ~~ /(\d+) \s (\d+)/; $range = +$0..+$1 },
@@ -199,4 +205,5 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
ok !defined(try { 0 .. (0, 1, 2) }), '0 .. List is illegal';
}
+
# # vim: ft=perl6 |
Migrated from rt.perl.org#67882 (status was 'resolved')
Searchable as RT67882$
The text was updated successfully, but these errors were encountered: