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
regex match inside a 'given $expr { ... }' block does not set $/ #1166
Comments
From @moritz20:56 <@moritz_> rakudo: given 'mrGreen 5 1 23 ' { /<[a..zA..Z]>*\d/ } You can see that $/ is not set inside the block, which is of course less Moritz |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S05-match/blocks.t commit 2f97978bac871ca9d2669c4b1050ac4a8b0c523d [t/spec] test for RT #67864 Inline Patchdiff --git a/t/spec/S05-match/blocks.t b/t/spec/S05-match/blocks.t
index 5ef8f68..4210fb7 100644
--- a/t/spec/S05-match/blocks.t
+++ b/t/spec/S05-match/blocks.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 20;
+plan 21;
=begin description
@@ -67,6 +67,17 @@ ok !defined($/), '$/ still undef in the outer block';
is "$/", 'x', '... and can use $/ outside the block';
}
+{
+ given '-Wall' {
+ if /\w+/ {
+ #?rakudo todo 'RT 67864'
+ ok $/ eq 'Wall', '$/ is properly set in a given { } block';
+ } else {
+ flunk 'regex did not match - $/ is properly set in a given { } block';
+ }
+ }
+}
+
# TODO: repeat ... until, gather/take, lambdas, if/unless statement modifiers
# TODO: move to t/spec/integration/
|
The RT System itself - Status changed from 'new' to 'open' |
From coleoid@yahoo.comgiven 'ick' { =begin output if <explicit> should say [i]: [i] =end output
|
From @masak<masak> rakudo: $_ = 42; if |
From @bbkrNOM: still broken bbkr:nom bbkr$ ./perl6 -e '$_ = 42; if /\d+/ { say +$/ }' |
From @jnthnOn Sun Sep 11 02:31:39 2011, bbkr wrote:
Works now:
Tagging testneeded. /jnthn |
From @moritzTest passes, closing ticket. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#67864 (status was 'resolved')
Searchable as RT67864$
The text was updated successfully, but these errors were encountered: