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

= doesn't parse in Rakudo #3042

Closed
p6rt opened this issue Feb 5, 2013 · 4 comments
Closed

= doesn't parse in Rakudo #3042

p6rt opened this issue Feb 5, 2013 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Feb 5, 2013

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

Searchable as RT116649$

@p6rt
Copy link
Author

p6rt commented Feb 5, 2013

From @masak

<TimToady> nr​: sub r2cf(Rat $x is copy) { gather $x [R/]= 1 while ($x
-= take $x.floor) > 0 }; say r2cf(1.4142136)
<p6eval> rakudo 935c90​: OUTPUT«===SORRY!===␤Preceding context expects
a term, but found infix = instead␤at /tmp/WXbDH1h_R_​:1␤------> b
r2cf(Rat $x is copy) { gather $x [R/]=⏏ 1 while ($x -= take $x.floor)

0 }; sa␤»
<p6eval> ..niecza v24-18-gaf64300​: OUTPUT«1 2 2 2 2 2 2 2 2 2 6 1 2 4 1 1 2␤»
<TimToady> dunno if you have that one yet
<masak> don't think so.
* masak submits TimToady's rakudobug
<masak> r​: my $x; $x [R/]= 1
<p6eval> rakudo 935c90​: OUTPUT«===SORRY!===␤Preceding context expects
a term, but found infix = instead␤at /tmp/95XYnmRMtC​:1␤------> my $x;
$x [R/]=⏏ 1␤»

@p6rt
Copy link
Author

p6rt commented Feb 7, 2015

From @usev6

This works now with Rakudo​:

$ perl6 -e 'my $x = 5; $x [R/]= 1; say $x'
0.2

$ perl6 -e 'sub r2cf(Rat $x is copy) { gather $x [R/]= 1 while ($x -= take $x.floor) > 0 }; say r2cf(1.4142136)'
1 2 2 2 2 2 2 2 2 2 6 1 2 4 1 1 2

I added a test to S03-metaops/reverse.t with commit Raku/roast@4dca70c8ee

I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Feb 7, 2015

From @usev6

This works now with Rakudo​:

$ perl6 -e 'my $x = 5; $x [R/]= 1; say $x'
0.2

$ perl6 -e 'sub r2cf(Rat $x is copy) { gather $x [R/]= 1 while ($x -= take $x.floor) > 0 }; say r2cf(1.4142136)'
1 2 2 2 2 2 2 2 2 2 6 1 2 4 1 1 2

I added a test to S03-metaops/reverse.t with commit Raku/roast@4dca70c8ee

I'm closing this ticket now.

@p6rt
Copy link
Author

p6rt commented Feb 7, 2015

@usev6 - Status changed from 'new' 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