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

Rakudo can`t parse .=sort: {...} #842

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

Rakudo can`t parse .=sort: {...} #842

p6rt opened this issue Mar 29, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 29, 2009

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

Searchable as RT64268$

@p6rt
Copy link
Author

p6rt commented Mar 29, 2009

From @ilyabelikin

Hi there,

rakudo> my @​a = 1,3,2; say @​a.sort​: {1}
132 # :)
rakudo> my @​a = 1,3,2; say @​a.=sort​: {1}
Statement not terminated properly at line 1, near "​: {1}\n" # :(
rakudo> my @​a = 1,3,2; say @​a.=sort;
123 # :)

ihrd​: std​: my @​a = 1,2,3; @​a.=sort​: {1}
p6eval​: std 26019​: OUTPUT«ok 00​:02 37mâ�¤Â»

Ilya

@p6rt
Copy link
Author

p6rt commented Jul 30, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/inplace.t

commit 3777ec04081bda1fc2bd7c06a21d2012c63e7853
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Thu Jul 30 03​:37​:55 2009 +0000

  [t/spec] Tests for RT #​64268
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;27812 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S03-operators/inplace.t b/t/spec/S03-operators/inplace.t
index 1f40b20..afa2d81 100644
--- a/t/spec/S03-operators/inplace.t
+++ b/t/spec/S03-operators/inplace.t
@@ -4,7 +4,7 @@ use Test;
 
 # L<S03/Assignment operators/A op= B>
 
-plan 19;
+plan 24;
 
 #?rakudo skip '.= with spaces'
 {
@@ -59,3 +59,16 @@ is ~@b, "a b d e z", "inplace sort";
     .=abs;
     is($_, 42, '.=foo form works on $_');
 }
+
+# RT #64268
+{
+    my @a = 1,3,2;
+    my @b = @a.sort: {1};
+    is @b, (1,3,2), 'works: @a.sort: {1}';
+
+    lives_ok { @a.=sort: {1} }, 'lives: @a.=sort: {1}';
+    is @a, (1,3,2), 'worked: @a.=sort: {1}';
+
+    lives_ok { @a.=sort }, 'lives: @a.=sort';
+    is @a, (1,2,3), 'worked: @a.=sort';
+}

@p6rt
Copy link
Author

p6rt commented Jul 30, 2009

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

@p6rt
Copy link
Author

p6rt commented Jul 30, 2009

From @kyleha

The tests for this pass now (with Rakudo
13ba2f319293b4a77b84c52bc85c80f93bb3e859), so I'm resolving this ticket.

@p6rt
Copy link
Author

p6rt commented Jul 30, 2009

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

@p6rt p6rt closed this as completed Jul 30, 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