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

'my $x //= 42' leaves $x undefined #845

Closed
p6rt opened this issue Mar 30, 2009 · 5 comments
Closed

'my $x //= 42' leaves $x undefined #845

p6rt opened this issue Mar 30, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 30, 2009

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

Searchable as RT64288$

@p6rt
Copy link
Author

p6rt commented Mar 30, 2009

From @masak

<szabgab> rakudo​: my $x; $x//=42; say $x;
<p6eval> rakudo 370dd7​: OUTPUT«42␤»
<moritz_> rakudo​: my $x //= 42; say $x.perl
<p6eval> rakudo 370dd7​: OUTPUT«undef␤»
<masak> heh.
<masak> bug.
<moritz_> masak​: there's a job for you :-)
* masak does his job

Expected behavior​: that the above two assignments behave the same.
More precisely, that the second one behave like the first one.

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

From @kyleha

There's a test for this in S03-operators/assign.t​:

  my $f //= 5;
  #?rakudo todo '//= in declaration (RT #​64288)'
  is $f, 5, '//= also works in declaration';

@p6rt
Copy link
Author

p6rt commented Aug 25, 2009

From @jnthn

On Mon Mar 30 01​:51​:23 2009, masak wrote​:

<szabgab> rakudo​: my $x; $x//=42; say $x;
<p6eval> rakudo 370dd7​: OUTPUT«42␤»
<moritz_> rakudo​: my $x //= 42; say $x.perl
<p6eval> rakudo 370dd7​: OUTPUT«undef␤»
<masak> heh.
<masak> bug.
<moritz_> masak​: there's a job for you :-)
* masak does his job

Expected behavior​: that the above two assignments behave the same.
More precisely, that the second one behave like the first one.

This has been fixed sometime last week, and the test un-fudged, but I
didn't spot this ticket then. Resolving.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Aug 25, 2009

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

@p6rt
Copy link
Author

p6rt commented Aug 25, 2009

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

@p6rt p6rt closed this as completed Aug 25, 2009
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