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
there's no match for Any aka /./ codegens differently from m/./ #5890
Comments
From @lizmat$ 6 'm/./; dd $/' $ 6 '/./; dd $/' Apparently the codegen of m/./ introduces a call to .match, whereas /./ codegens to something that does *not* call .match. I can only assume that’ because it assumes there can be named parameters (even though we could see that that is not the case). So fixing the codegen in this case would not solve this problem: $ 6 'm:2nd/./; dd $/' The only way I see we could fix this, is by adding an Any.match or a Mu.match, that would just set $/ to Nil. |
From @lizmatFixed with 3fe5893 , tests needed.
|
From @zoffixznetOn Mon, 19 Dec 2016 11:39:54 -0800, elizabeth wrote:
I'm 10 months late to the party, but this looks off to me. The commit adds a `.match` method that does nothing to virtually every object. Seems the new behaviour simply hides a bug in user's code, so I'm hesitant |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetOn Sun, 15 Oct 2017 00:12:18 -0700, cpan@zoffix.com wrote:
In addition, I see this difference in the actual "match against $_" thing: <Zoffix__> m: $_ = 'not right'; sub { $_ = Str; say so /./ }() Regex.Bool looks[^1] up the callstack for the first .DEFINITE `$_`, whereas, the `m/./` form just uses whatever lexical $_ is available. [1] https://github.com/rakudo/rakudo/blob/ebb0521bd/src/core/Regex.pm#L83 |
Migrated from rt.perl.org#130363 (status was 'open')
Searchable as RT130363$
The text was updated successfully, but these errors were encountered: