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
Can't index custom-made Match object in $/ in Rakduo #1344
Comments
From @masak<masak> rakudo: class MyMatch does Associative { method |
From @moritzOn Tue Oct 06 07:15:11 2009, masak wrote:
Works (with [ ] instead of { }), just needs tests. |
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/S02-names_and_variables/varnames.t commit 2079135f0c3fc502685dd42c6e7ab6997166508a [t/spec] tests for RT #69596, aliasing $0 into custom match objects Inline Patchdiff --git a/t/spec/S02-names_and_variables/varnames.t b/t/spec/S02-names_and_variables/varnames.t
index ff097d2..a05852c 100644
--- a/t/spec/S02-names_and_variables/varnames.t
+++ b/t/spec/S02-names_and_variables/varnames.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 6;
+plan 8;
# L<S02/Names and Variables/special variables of Perl 5 are going away>
@@ -16,5 +16,16 @@ eval_lives_ok 'my proto $/', 'as can $/';
eval_dies_ok 'my $f!ao = "beh";', "normal varnames can't have ! in their name";
eval_dies_ok 'my $fo:o::b:ar = "bla"', "var names can't have colons in their names either";
+{
+ class MyMatch {
+ method postcircumfix:<[ ]>($x) {
+ "foo$x";
+ }
+ }
+ $/ = MyMatch.new;
+ is $0, 'foo0', 'Aliasing of $0 into $/ (1)';
+ is $4, 'foo4', 'Aliasing of $0 into $/ (2)';
+}
+
# vim: ft=perl6 |
Migrated from rt.perl.org#69596 (status was 'resolved')
Searchable as RT69596$
The text was updated successfully, but these errors were encountered: