Skip Menu |
Report information
Id: 131925
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Smartmatching a junction against a regex object vs m// (‘a’|‘b’ ~~ m/‘a’/)
Download (untitled) / with headers
text/plain 255b
Code: say so $*DISTRO.Str|$*KERNEL.Str ~~ /linux/ Result: True Code: say so $*DISTRO.Str|$*KERNEL.Str ~~ m/linux/ Result: False I'd expect the result to be identical in both cases. IRC log: https://irclog.perlgeek.de/perl6-dev/2017-08-18#i_15039736
Download (untitled) / with headers
text/plain 213b
The problem only appears if `m//` is used directly as the RHS of `~~`: $_ = 'a' | 'b'; say m/a/; # any(「a」, Nil) say $_ ~~ m/a/; # False say $_ ~~ { m/a/ }; # any(「a」, Nil)
Download (untitled) / with headers
text/plain 241b
<smls> bisectable6: say <a b>.any ~~ m/a/; <bisectable6> smls, On both starting points (old=2015.12 new=e3e29c5) the exit code is 0 and the output is identical as well <bisectable6> smls, Output on both points: «False»
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 591b
On Fri, 18 Aug 2017 13:26:25 -0700, alex.jakimenko@gmail.com wrote: Show quoted text
> Code: > say so $*DISTRO.Str|$*KERNEL.Str ~~ /linux/ > > Result: > True > > > Code: > say so $*DISTRO.Str|$*KERNEL.Str ~~ m/linux/ > > Result: > False > > > I'd expect the result to be identical in both cases. > > IRC log: https://irclog.perlgeek.de/perl6-dev/2017-08-18#i_15039736
This now[^1] returns True for both cases, so don't understand why and unsure whether the bug is actually fixed or if that commit just shadowed it. [1] https://github.com/rakudo/rakudo/commit/8a0f6ac110b42a37a352e46c32736bac59f9ba83


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org