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

{ ; } shouldn't be a hash #1884

Closed
p6rt opened this issue Jun 27, 2010 · 4 comments
Closed

{ ; } shouldn't be a hash #1884

p6rt opened this issue Jun 27, 2010 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jun 27, 2010

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

Searchable as RT76198$

@p6rt
Copy link
Author

p6rt commented Jun 27, 2010

From @zhuomingliang

{ ; } shouldn't be a hash, it should be a block

rakudo​: {;}.WHAT.say
rakudo 478ba4​: OUTPUT«Hash()â�¤Â»

rakudo​: { say 'Hi'; }()
rakudo 478ba4​: OUTPUT«Hiâ�¤Â»

rakudo​: {}()
rakudo 478ba4​: OUTPUT«invoke() not implemented in class â��â�¤in
main program body at line 11​:/tmp/3Yc9uL9hK5â�¤Â»

�此�你身��康�天天快�
��亮

 

@p6rt
Copy link
Author

p6rt commented Jun 27, 2010

From @pmichaud

Now fixed in current rakudo; spectests already exist, so closing ticket.
Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Jun 27, 2010

@pmichaud - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Jun 27, 2010
@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S06-other/anon-hashes-vs-blocks.t

commit 2b061254b408b68e101c33c41d84c9b10a40d309
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon Jun 28 20​:59​:09 2010 +0000

  [t/spec] test for RT #​76198, {;} should be a Block
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31487 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S06-other/anon-hashes-vs-blocks.t b/t/spec/S06-other/anon-hashes-vs-blocks.t
index 670f67c..adb76eb 100644
--- a/t/spec/S06-other/anon-hashes-vs-blocks.t
+++ b/t/spec/S06-other/anon-hashes-vs-blocks.t
@@ -45,6 +45,7 @@ ok $bar ~~ Hash, '%foo in a block causes hash composing';
     ok { $^a => 'b' } ~~ Block, '... as a key';
     ok { a => $^x }   ~~ Block, '... as a value';
     ok { b => 3, a => $^x, 4 => 5 }   ~~ Block, '... somewhere deep inside';
+    ok {;} ~~ Block, '{;} is a Block';
 }
 
 done_testing;

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