Skip Menu |
Report information
Id: 129307
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

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



Subject: [BUG] $/.perl doesn't round-trip when captures are present
Download (untitled) / with headers
text/plain 1.2k
The S05-match/perl.t contains this test: is-deeply EVAL($/.perl), $/, 'EVAL of Match.perl recreates Match'; However, the test doesn't catch this variant that fails to recreate the exact Match: "ac" ~~ /(.)(.)?(.)/; is-deeply $/.perl.EVAL, $/; # Failed test at /tmp/2td1RCdiII line 1 # expected: Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "ac", to => 1, from => 0)), hash => Map.new(("" => [])), orig => "ac", to => 2, from => 0) # got: Match.new(ast => Any, list => (), hash => Map.new(()), orig => "ac", to => 2, from => 0) «exit code = 1» This appears to have been the case since 2015.07, where the output is slightly different, but the `list` key is still empty: # Failed test at /tmp/VGpy7_vt6i line 1 # expected: Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "ac", to => 1, from => 0), Any, Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "ac", to => 2, from => 1)), hash => EnumMap.new("" => []), orig => "ac", to => 2, from => 0) # got: Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "ac", to => 2, from => 0) «exit code = 1»


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