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

&?ROUTINE and &?BLOCK return "undef" #1066

Closed
p6rt opened this issue Jun 16, 2009 · 4 comments
Closed

&?ROUTINE and &?BLOCK return "undef" #1066

p6rt opened this issue Jun 16, 2009 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jun 16, 2009

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

Searchable as RT66632$

@p6rt
Copy link
Author

p6rt commented Jun 16, 2009

From not.com@gmail.com

t/spec/S02-magicals/sub.t which tests &?ROUTINE fails all 4 tests in rakudo
also-

yary perl6​: my $sub= -> $n { if $n == 0 { say "done" } else { say $n;
&?ROUTINE($n-1)}}; $sub(3)
01​:22 p6eval elf 27084​:
OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb​:141​:in `block in
to_dump0'​: undefined method `to_dump0' for true​:TrueClass
(NoMethodError)␤ from
/home/evalenv/pugs/misc/STD_red/match.rb​:140​:in `each'␤ from
/home/evalenv/pugs/misc/STD_red/match.rb​:140​:in `map'␤ from
01​:22 ../home/evalenv/pugs/misc…
01​:22 ..pugs​: OUTPUT«3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤
3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3
␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤
3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3
␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤
01​:22 ..rakudo ba09b2​: OUTPUT«3␤invoke() not implemented in class
'Undef'␤in Main (/tmp/Fw2Mt0GzcQ​:2)␤»
01​:22 yary yikes, I hope pugs terminated
01​:23 pugs​: say 1
01​:23 p6eval pugs​: OUTPUT«1␤»
01​:23 yary phew
01​:24 Is &?ROUTINE not fully implemented in rakudo?
02​:08 eternaleye rakudo​: -> { my $foo = 'bar'; say &?ROUTINE.perl }.()
02​:08 TimToady that wasn't a routine
02​:08 p6eval rakudo ba09b2​: OUTPUT«undef␤»
02​:08 TimToady that's just a Block
02​:08 try &?BLOCK
02​:08 eternaleye rakudo​: -> { my $foo = 'bar'; say &?BLOCK.perl }.()
02​:08 p6eval rakudo ba09b2​: OUTPUT«undef␤»
02​:10 TimToady my $sub= -> $n { if $n == 0 { say "done" } else { say
$n; &?BLOCK($n-1)}}; $sub(3)
02​:10 oh, that won't work either
02​:10 since it's the innermost block
02​:11 eternaleye &?OUTER​::BLOCK ?
02​:11 TimToady perl6​: my $sub= -> $n { if $n == 0 { say "done" } else
{ say $n; &?OUTER​::BLOCK($n-1)}}; $sub(3)
02​:11 p6eval rakudo ba09b2​: OUTPUT«3␤invoke() not implemented in class
'Undef'␤in Main (/tmp/jkTmtRPktf​:2)␤»
02​:11 ..elf 27084​:
OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb​:141​:in `block in
to_dump0'​: undefined method `to_dump0' for true​:TrueClass
(NoMethodError)␤ from
/home/evalenv/pugs/misc/STD_red/match.rb​:140​:in `each'␤ from
/home/evalenv/pugs/misc/STD_red/match.rb​:140​:in `map'␤ from
02​:11 ../home/evalenv/pugs/misc…
02​:11 ..pugs​: OUTPUT«3␤*** outer - not yet implemented​: "&?BLOCK"␤
at /tmp/99Zp4RYbms line 1, column 59-79␤»
02​:11 TimToady perl6​: my $sub= sub ($n) { if $n == 0 { say "done" }
else { say $n; &?ROUTINE($n-1)}}; $sub(3)
02​:11 p6eval rakudo ba09b2​: OUTPUT«3␤invoke() not implemented in class
'Undef'␤in sub _block50 (/tmp/KBps6yWr0I​:2)␤called from Main
(/tmp/KBps6yWr0I​:2)␤»
02​:11 ..pugs​: OUTPUT«3␤2␤1␤done␤»
02​:11 ..elf 27084​:
OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb​:141​:in `block in
to_dump0'​: undefined method `to_dump0' for true​:TrueClass
(NoMethodError)␤ from
/home/evalenv/pugs/misc/STD_red/match.rb​:140​:in `each'␤ from
/home/evalenv/pugs/misc/STD_red/match.rb​:140​:in `map'␤ from
02​:11 ../home/evalenv/pugs/misc…

@p6rt
Copy link
Author

p6rt commented Jan 17, 2012

From @jnthn

On Tue Jun 16 08​:51​:02 2009, not.com@​gmail.com wrote​:

t/spec/S02-magicals/sub.t which tests &?ROUTINE fails all 4 tests in
rakudo

It and tests for &?BLOCK are now run and passed, so resolving ticket.

Thanks,

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 17, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 17, 2012

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

@p6rt p6rt closed this as completed Jan 17, 2012
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