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
Infinite Loop with missing second arg on .subst-mutate #4984
Comments
From @zoffixznetConsider this code that is missing the second argument for .subst-mutate method and the error it generates: <Zoffix> m: my $foo = '42'; $foo.subst-mutate: /^'ba'/; What's happening is instead of getting the .subst-mutate from Str type, the missing arg causes us to get the one from Cool type: https://github.com/rakudo/rakudo/blob/8c001e0a8fc4aacc93eb4327d30071b00f9699fa/src/core/Cool.pm#L267 The Cool then stringifies the argument and attempts to call .subst-mutate again, with same args, restarting the infinite loop: https://github.com/rakudo/rakudo/blob/8c001e0a8fc4aacc93eb4327d30071b00f9699fa/src/core/Cool.pm#L273 The number of args in Cool should be detected and error generated. |
From @lizmat
Fixed with 7d4cdbcdd5fce287afc32 . Since there are apparently *NO* spectests for Str.subst-mutate whatsover, I’m leaving the testing as low hanging fruit for someone else. Liz |
The RT System itself - Status changed from 'new' to 'open' |
From @LLFournThere is no mention of subst-mutate in the design docs. Should I still LL On Mon, Jan 4, 2016 at 8:52 AM Elizabeth Mattijsen <liz@dijkmat.nl> wrote:
|
From @lizmat
Well, subst-mutate is *not* used inside of the core itself, so I can only assume it is intended to be user-facing. So yes, please add tests for it in roast, in a new file as to easily keep it apart should that be needed after all. Liz |
From @zoffixznetOn Mon, 04 Jan 2016 03:00:00 -0800, elizabeth wrote:
There's a bunch of tests for it now and I marked the one that tests this bug in Raku/roast@6c54594 |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#127135 (status was 'resolved')
Searchable as RT127135$
The text was updated successfully, but these errors were encountered: