On Sun, 10 Sep 2017 11:22:29 -0700, sml...@gmail.com wrote: > A `return` outside a routine now always seems to throw a run-time > error, as it should: > > $ perl6 -e 'return' > Attempt to return outside of any Routine > in block <unit> at -e line 1 > > $ perl6 -e '{ return }' > Attempt to return outside of any Routine > in block <unit> at -e line 1 > > $ MVM_SPESH_DISABLE=1 perl6 -e '{ return }' > Attempt to return outside of any Routine > in block <unit> at -e line 1 > > Bisectable points to this fix from Dec 2015: > > https://gist.github.com/Whateverable/63b5da597e229d167d8708a43d4501de > https://github.com/rakudo/rakudo/commit/a4ca12a > > This ticket can be closed once tests are added to roast.
It looks to me like the tests already in S04-statements/return.t should suffice, no? (This appears to be another case where a bug filed and fixed during the craziness of the 2015 release and GLR was not followed up in RT by closing the ticket.) Since MVM_* environment variables are not part of the Perl 6 specification, tests for those cases aren't a matter for roast... possibly they could go in the rakudo tree, but it would probably be better to figure out how to golf that SEGV down into an nqp one-liner... rakudo can no longer produce the situation that caused that SEGV, so... where to follow that thread I dunno.