Does tha capture object $/ retain a live tie to the string it matched?

2008-08-23 Thread Carl Mäsak
Yesterday I got bitten by the fact that currently in Rakudo, $/ doesn't copy content from the matched string, but instead trusts that it stays in the matched string and doesn't change. Is this the intended behaviour, or should $/ keep a copy the string contents? As the following examples show, Im

Re: Does tha capture object $/ retain a live tie to the string it matched?

2008-08-23 Thread Moritz Lenz
Carl Mäsak wrote: > Yesterday I got bitten by the fact that currently in Rakudo, $/ > doesn't copy content from the matched string, but instead trusts that > it stays in the matched string and doesn't change. > > Is this the intended behaviour, or should $/ keep a copy the string > contents? As th

Re: Does tha capture object $/ retain a live tie to the string it matched?

2008-08-23 Thread Patrick R. Michaud
On Sat, Aug 23, 2008 at 12:55:44PM +0200, Moritz Lenz wrote: > Carl Mäsak wrote: > > # should $/ really keep ties to $s like this? > > rakudo: my $s = "hello"; $s ~~ /hello/; $s = "goodbye"; say $/ > > rakudo 29834: OUTPUT[goodb␤] > > I'm pretty sure it's a bug in rakudo. It's a bug somewhere,