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

Cannot wrap a multi sub in Rakudo #2104

Closed
p6rt opened this issue Aug 27, 2010 · 6 comments
Closed

Cannot wrap a multi sub in Rakudo #2104

p6rt opened this issue Aug 27, 2010 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 27, 2010

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

Searchable as RT77472$

@p6rt
Copy link
Author

p6rt commented Aug 27, 2010

From @masak

<plobsing> rakudo​: multi sub B() { say "multi" }; &B.wrap(sub {say
"before"; callsame; say "after"}); B()
<p6eval> rakudo 18189a​: OUTPUT«get_attr_str() not implemented in class
'Perl6MultiSub' [...]
<plobsing> rakudo​: sub B() { say "only" }; &B.wrap(sub {say "before";
callsame; say "after"}); B()
<p6eval> rakudo 18189a​: OUTPUT«before␤only␤after␤»
<plobsing> rakudobug?
* masak submits wrap/multi rakudobug
<masak> plobsing++

@p6rt
Copy link
Author

p6rt commented Nov 20, 2012

From @FROGGS

looks good now IMO​:
<FROGGS> r​: multi sub B() { say "multi" }; &B.wrap(sub {say "before";
callsame; say "after"}); B()
<p6eval> rakudo bf472b​: OUTPUT«multi␤»
<FROGGS> r​: sub B() { say "only" }; &B.wrap(sub {say "before"; callsame;
say "after"}); B()
<p6eval> rakudo bf472b​: OUTPUT«before␤only␤after␤»

@p6rt
Copy link
Author

p6rt commented Nov 20, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 12, 2013

From @moritz

On Tue Nov 20 09​:37​:38 2012, FROGGS.de wrote​:

looks good now IMO​:
<FROGGS> r​: multi sub B() { say "multi" }; &B.wrap(sub {say "before";
callsame; say "after"}); B()
<p6eval> rakudo bf472b​: OUTPUT«multi␤»

Not good; should say "before\only\nafter\n" just like the only-sub case​:

<FROGGS> r​: sub B() { say "only" }; &B.wrap(sub {say "before"; callsame;
say "after"}); B()
<p6eval> rakudo bf472b​: OUTPUT«before␤only␤after␤»

Test added to S06-advanced/wrap.t.

@p6rt
Copy link
Author

p6rt commented Mar 6, 2017

From @MasterDuke17

$ perl6 -e 'multi sub B() { say "multi" }; &B.wrap(sub {say "before"; callsame; say "after"}); B()'
before
multi
after

$ perl6 --version
This is Rakudo version 2017.02-177-g9019a5b8b built on MoarVM version 2017.02-25-g5dd8f04b
implementing Perl 6.c.

According to committable, this was fixed sometime between 2014.07 and 2014.08.

@p6rt p6rt closed this as completed Mar 6, 2017
@p6rt
Copy link
Author

p6rt commented Mar 6, 2017

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

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant