Skip to content
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

infix:<xx> keeps containers around since October, resulting in confusing behaviour #6129

Closed
p6rt opened this issue Mar 7, 2017 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Mar 7, 2017

Migrated from rt.perl.org#130941 (status was 'resolved')

Searchable as RT130941$

@p6rt
Copy link
Author

p6rt commented Mar 7, 2017

From @zoffixznet

Original user with the problem​: https://irclog.perlgeek.de/perl6/2017-03-06#i_14216611

The issue is code like​:

  <Zoffix> m​: my $y = 25; my $z = $y xx 10; say $z; $y = '♥'; say $z;
  <camelia> rakudo-moar 2a2e46​: OUTPUT​: «(25 25 25 25 25 25 25 25 25 25)␤(♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥)␤»

The `$y` container given to `xx` is stuffed into each item in the list, and as a result, updates
to either item in the list or to the `$y` variable update all elements.

This is pretty surprising and is very likely unwanted most of the time.

bisectable points to an October 2016 commit as the cause​: rakudo/rakudo@d192f1c29a

The type of the output of `xx` also got changed from a Seq to a List in that commit.

<Zoffix> c​: d192f1c29a^,d192f1c29a my $y = 25; my $z = $y xx 10; say $z; $y = '♥'; say $z; say $z
<committable6> Zoffix, ¦d192f1c29a^​: «(25 25 25 25 25 25 25 25 25 25)␤(25 25 25 25 25 25 25 25 25 25)␤(25 25 25 25 25 25 25 25 25 25)» ¦d192f1c​: «(25 25 25 25 25 25 25 25 25 25)␤(♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥)␤(♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥)»

@p6rt
Copy link
Author

p6rt commented Mar 8, 2017

From @zoffixznet

A temporary fix has been committed in rakudo/rakudo@5b7b7fb

@p6rt
Copy link
Author

p6rt commented Mar 10, 2018

From @AlexDaniel

This ticket now needs tests, further discussion related issues here​: rakudo/rakudo#1607

On 2017-03-08 05​:56​:13, cpan@​zoffix.com wrote​:

A temporary fix has been committed in
rakudo/rakudo@5b7b7fb

@p6rt
Copy link
Author

p6rt commented Mar 10, 2018

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Apr 7, 2018

From @AlexDaniel

Tests in Raku/roast@1a42efd

On 2018-03-10 10​:43​:14, alex.jakimenko@​gmail.com wrote​:

This ticket now needs tests, further discussion related issues here​:
rakudo/rakudo#1607

On 2017-03-08 05​:56​:13, cpan@​zoffix.com wrote​:

A temporary fix has been committed in

rakudo/rakudo@5b7b7fb

@p6rt
Copy link
Author

p6rt commented Apr 7, 2018

@AlexDaniel - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Apr 7, 2018
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant