New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deep-cloned array loses its original content on .unshift in Rakudo #3084
Comments
From @masak<masak> just found my heisenbug :) Niecza is right throughout, of course. The .unshift method adds |
From @pmichaudOn Wed, Mar 20, 2013 at 12:41:41PM -0700, Carl Mäsak wrote:
The problem is apparently with sink context, not .unshift. I have a temporary 20:26 <pmichaud> I wonder if the problem is related to sink context. Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzOn 03/20/2013 10:37 PM, Patrick R. Michaud wrote:
This patch works in this particular case: Inline Patchdiff --git a/src/core/List.pm b/src/core/List.pm
index 84f7eff..964d6f4 100644
--- a/src/core/List.pm
+++ b/src/core/List.pm
@@ -379,8 +379,8 @@ my class List does Positional {
$val;
}
- method sink() {
- self.gimme(*, :sink);
+ method sink(\SELF:) {
+ SELF.gimme(*, :sink) unless nqp::iscont(SELF);
Nil;
}
}
Cheers, |
From @pmichaudOn Thu, Mar 21, 2013 at 08:49:42AM +0100, Moritz Lenz wrote:
I think I prefer method sink(\SELF:) { because I'm not entirely certain that :sink is safe in Pm |
From @moritzOn 03/21/2013 01:40 PM, Patrick R. Michaud wrote:
Not using :sink isn't safe either: Test Summary Report t/spec/S04-statements/next.rakudo (Wstat: 0 Tests: They go away when keeping the :sink. Cheers, |
From @pmichaudOn Thu, Mar 21, 2013 at 08:14:08PM +0100, Moritz Lenz wrote:
This doesn't seem to be sufficient; as $c.unshift(47) still In the meantime, I've added a test for this ticket as Pm |
From @usev6On Thu Mar 21 15:43:19 2013, pmichaud wrote:
This test passes now on the 'glr' branch (and was unfudged with commit Raku/roast@38af820522). I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6On Thu Mar 21 15:43:19 2013, pmichaud wrote:
This test passes now on the 'glr' branch (and was unfudged with commit Raku/roast@38af820522). I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#117235 (status was 'resolved')
Searchable as RT117235$
The text was updated successfully, but these errors were encountered: