This works on Moar and JVM but dies on Parrot:

$ perl6-m -e 'my $p = "ab"; substr-rw($p, 0, 3) = "/"; say "--$p--"'  ## same 
output with perl6-j
--/--

$ perl6-p -e 'my $p = "ab"; substr-rw($p, 0, 3) = "/"; say "--$p--"'
Cannot take substr outside string
  in sub  at gen/parrot/CORE.setting:7740
  in any  at gen/parrot/BOOTSTRAP.nqp:308
  in block <unit> at -e:1

I added a test (fudged 'skip') for Parrot with commit 
https://github.com/perl6/roast/commit/7eb85d9e18.

Reply via email to