On Sun, 10 Apr 2016 07:56:38 -0700, mar...@senfdax.de wrote:
> Hi there,
> 
> following code dies in this line:
> 
> if my $match = $r.match($meth, $uri) { die "What?!" unless $match }
> 
> this happens on both moar-2015.12 and moar-2016.03
> 
> 
> 
> 
> 
> class Abc {
>     has Str $.method;
>     has Regex $.path is required;
> 
>     method match (Str $method, Str $path) {
>         return False if $.method ne $method;
>         return $path ~~ $.path;
>     }
> }
> 
> my @routes = (
>     Abc.new(method => "GET", path => / ^ '/'foo $ / );
>     Abc.new(method => "POST", path => / ^ '/'bar $ /);
> );
> 
> sub foo($meth, $uri) {
>     for @routes -> $r {
>         if my $match = $r.match($meth, $uri) { die "What?!" unless $match }
>     }
> }
> 
> my @hex = ('A'..'F', 'a'..'f', 0..9).flat;
> for @hex -> $first {
>     for @hex -> $second {
>         foo("POST", 'http://127.0.0.1/utf8');
>     }
> }
> 

Unable to reproduce this on This is Rakudo version 2016.12-10-g7a642f8 built on 
MoarVM version 2016.12
implementing Perl 6.c.


Reply via email to