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

Item assignment with hash push doesn't push the value assigned in Rakudo #2626

Closed
p6rt opened this issue Jan 31, 2012 · 5 comments
Closed

Item assignment with hash push doesn't push the value assigned in Rakudo #2626

p6rt opened this issue Jan 31, 2012 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 31, 2012

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

Searchable as RT109476$

@p6rt
Copy link
Author

p6rt commented Jan 31, 2012

From @masak

<grondilu> perl6​: my %h = (<foo> => []); push %h<foo>, my $foo =
"bar"; say $foo; # I'm a expecting "bar"
<p6eval> pugs b927740, niecza v13-389-g852f0ff​: OUTPUT«bar␤»
<p6eval> ..rakudo ce5cca​: OUTPUT«Any()␤»
<grondilu> rakudo--, niecza++
<moritz> rakudo​: my %h = (<foo> => []); push %h<foo>, (my $foo =
'bar'); say $foo
<p6eval> rakudo ce5cca​: OUTPUT«bar␤»
<grondilu> shoudn't '=' come before ',' ?
<moritz> there are two '=' with different precedence :/
<grondilu> perl6​: my %h = (<foo> => []); my $foo; push %h<foo>, $foo
= "bar"; say $foo; # I'm a expecting "bar"
<p6eval> pugs b927740, niecza v13-389-g852f0ff​: OUTPUT«bar␤»
<p6eval> ..rakudo ce5cca​: OUTPUT«Any()␤»
<grondilu> I'm pretty sure it should give 'bar'
<masak> aye.
<grondilu> notice that it works better with a plain array​:
<grondilu> rakudo​: push my @​a, my $foo = "bar"; say $foo
<p6eval> rakudo ce5cca​: OUTPUT«bar␤»
<masak> do we have an RT ticket for this?
<masak> ISTR we have something about item assignment...
<masak> ah, we have https://rt-archive.perl.org/perl6/Ticket/Display.html?id=67944
<masak> but it's resolved.
* masak submits new rakudobug

@p6rt
Copy link
Author

p6rt commented May 30, 2012

From @diakopter

On Tue Jan 31 01​:34​:03 2012, masak wrote​:

<grondilu> perl6​: my %h = (<foo> => []); push %h<foo>, my $foo =
"bar"; say $foo; # I'm a expecting "bar"
<p6eval> pugs b927740, niecza v13-389-g852f0ff​: OUTPUT«bar␤»
<p6eval> ..rakudo ce5cca​: OUTPUT«Any()␤»
<grondilu> rakudo--, niecza++
<moritz> rakudo​: my %h = (<foo> => []); push %h<foo>, (my $foo =
'bar'); say $foo
<p6eval> rakudo ce5cca​: OUTPUT«bar␤»
<grondilu> shoudn't '=' come before ',' ?
<moritz> there are two '=' with different precedence :/
<grondilu> perl6​: my %h = (<foo> => []); my $foo; push %h<foo>, $foo
= "bar"; say $foo; # I'm a expecting "bar"
<p6eval> pugs b927740, niecza v13-389-g852f0ff​: OUTPUT«bar␤»
<p6eval> ..rakudo ce5cca​: OUTPUT«Any()␤»
<grondilu> I'm pretty sure it should give 'bar'
<masak> aye.
<grondilu> notice that it works better with a plain array​:
<grondilu> rakudo​: push my @​a, my $foo = "bar"; say $foo
<p6eval> rakudo ce5cca​: OUTPUT«bar␤»
<masak> do we have an RT ticket for this?
<masak> ISTR we have something about item assignment...
<masak> ah, we have https://rt-archive.perl.org/perl6/Ticket/Display.html?
id=67944
<masak> but it's resolved.
* masak submits new rakudobug

fixed now. marking testneeded.

19​:08 <diakopter> r​: my %h = (<foo> => []); push %h<foo>, my $foo =
"bar"; say $foo; # I'm
  a expecting "bar"
19​:08 <p6eval> rakudo 024843​: OUTPUT«bar␤»
19​:10 <diakopter> r​: my %h = (<foo> => []); my $foo; push %h<foo>, $foo
= "bar"; say $foo;
  # I'm a expecting "bar"
19​:10 <p6eval> rakudo 024843​: OUTPUT«bar␤»

@p6rt
Copy link
Author

p6rt commented May 30, 2012

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

@p6rt
Copy link
Author

p6rt commented Jun 29, 2012

From @moritz

Now tested in S32-array/push.t

@p6rt
Copy link
Author

p6rt commented Jun 29, 2012

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

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