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

setelems on native arrays doesn't clear the array #5189

Closed
p6rt opened this issue Mar 21, 2016 · 6 comments
Closed

setelems on native arrays doesn't clear the array #5189

p6rt opened this issue Mar 21, 2016 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Mar 21, 2016

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

Searchable as RT127756$

@p6rt
Copy link
Author

p6rt commented Mar 21, 2016

From @lizmat

use nqp; my str @​a = "a".."e"; nqp​::setelems(@​a,0); nqp​::setelems(@​a,5); say @​a.join("​:”)
a​:b​:c​:d​:e

expected​:
:​::​:

same for int / num arrays.

@p6rt
Copy link
Author

p6rt commented Mar 22, 2016

From @lizmat

On 21 Mar 2016, at 16​:41, Elizabeth Mattijsen (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Elizabeth Mattijsen
# Please include the string​: [perl #​127756]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127756 >

use nqp; my str @​a = "a".."e"; nqp​::setelems(@​a,0); nqp​::setelems(@​a,5); say @​a.join("​:”)
a​:b​:c​:d​:e

expected​:
:​::​:

same for int / num arrays.

And the same for Bufs.reallocate​:

$ 6 'dd Buf.allocate(10, (1,2,3)).reallocate(0).reallocate(5)'
Buf.new(1,2,3,1,2)

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

Still present today on rakudo 89470a​:

<Zoffix> m​: use nqp; my str @​a = "a".."e"; nqp​::setelems(@​a,0); nqp​::setelems(@​a,5); say @​a.join("​:")
<camelia> rakudo-moar 89470a​: OUTPUT«a​:b​:c​:d​:e␤»
<Zoffix> m​: say Buf.allocate(10, (1,2,3)).reallocate(0).reallocate(5)
<camelia> rakudo-moar 89470a​: OUTPUT«Buf​:0x<01 02 03 01 02>␤»

@p6rt
Copy link
Author

p6rt commented Dec 24, 2017

From @zoffixznet

On Tue, 22 Mar 2016 07​:10​:54 -0700, elizabeth wrote​:

On 21 Mar 2016, at 16​:41, Elizabeth Mattijsen (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Elizabeth Mattijsen
# Please include the string​: [perl #​127756]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127756 >

use nqp; my str @​a = "a".."e"; nqp​::setelems(@​a,0);
nqp​::setelems(@​a,5); say @​a.join("​:”)
a​:b​:c​:d​:e

expected​:
:​::​:

same for int / num arrays.

And the same for Bufs.reallocate​:

$ 6 'dd Buf.allocate(10, (1,2,3)).reallocate(0).reallocate(5)'
Buf.new(1,2,3,1,2)

Thank you for the report. This is now fixed.

Fix​: MoarVM/MoarVM@43c926f9e0
  Raku/nqp@e64fb5b44b
  rakudo/rakudo@e5bb9bd20cdd319
Tests​: Raku/roast@20b76e6274969787e
  Raku/roast@946e42eb08
Unfudge​: Raku/roast@8533ec69249bf2b30

@p6rt
Copy link
Author

p6rt commented Dec 24, 2017

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

@p6rt
Copy link
Author

p6rt commented Dec 24, 2017

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

@p6rt p6rt closed this as completed Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant