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

try BLOCK messes up $_ when used in statement-modifying contextualizers #2668

Closed
p6rt opened this issue Mar 13, 2012 · 7 comments
Closed

try BLOCK messes up $_ when used in statement-modifying contextualizers #2668

p6rt opened this issue Mar 13, 2012 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Mar 13, 2012

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

Searchable as RT111704$

@p6rt
Copy link
Author

p6rt commented Mar 13, 2012

From @moritz

10​:53 < moritz> r​: try { say $_ } for <1 2>
10​:53 <+p6eval> rakudo bd6742​: OUTPUT«Any()␤Any()␤»

should be 1\n2\n

10​:53 < moritz> r​: try say $_ for <1 2>
10​:53 <+p6eval> rakudo bd6742​: OUTPUT«1␤2␤»
10​:53 < moritz> ok, only the block case

Same with given​:

10​:55 < moritz> r​: try { say $_ } given 2
10​:55 <+p6eval> rakudo bd6742​: OUTPUT«Any()␤»

@p6rt
Copy link
Author

p6rt commented Mar 13, 2012

From @moritz

Now tested in S04-statements/try.t

Cheers,
Moritz

Am 13.03.2012 10​:55, schrieb Moritz Lenz (via RT)​:

# New Ticket Created by Moritz Lenz
# Please include the string​: [perl #​111704]
# in the subject line of all future correspondence about this issue.
#<URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=111704>

10​:53< moritz> r​: try { say $_ } for<1 2>
10​:53<+p6eval> rakudo bd6742​: OUTPUT«Any()␤Any()␤»

should be 1\n2\n

10​:53< moritz> r​: try say $_ for<1 2>
10​:53<+p6eval> rakudo bd6742​: OUTPUT«1␤2␤»
10​:53< moritz> ok, only the block case

Same with given​:

10​:55< moritz> r​: try { say $_ } given 2
10​:55<+p6eval> rakudo bd6742​: OUTPUT«Any()␤»

@p6rt
Copy link
Author

p6rt commented Feb 7, 2013

From @FROGGS

no changes​:

<FROGGS> nr​: try { say $_ } for <1 2>
<p6eval> rakudo 4fb07b​: OUTPUT«Any()␤Any()␤»
<p6eval> ..niecza v24-19-g5f89e5f​: OUTPUT«1␤2␤»
<FROGGS> nr​: try say $_ for <1 2>
<p6eval> rakudo 4fb07b, niecza v24-19-g5f89e5f​: OUTPUT«1␤2␤»
<FROGGS> nr​: try { say $_ } given 2
<p6eval> niecza v24-19-g5f89e5f​: OUTPUT«2␤»
<p6eval> ..rakudo 4fb07b​: OUTPUT«Any()␤»

@p6rt
Copy link
Author

p6rt commented Feb 7, 2013

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

@p6rt
Copy link
Author

p6rt commented Apr 13, 2014

From @moritz

<moritz> nr​: try { say $_ } given 2
<camelia> rakudo-jvm 7d2e55​: OUTPUT«(timeout)»
<camelia> ..rakudo-parrot 7d2e55, niecza v24-109-g48a8de3​: OUTPUT«2␤»
<camelia> ..rakudo-moar 7d2e55​: OUTPUT«Nil␤»

@p6rt
Copy link
Author

p6rt commented Apr 28, 2015

From @jnthn

On Tue Mar 13 02​:55​:58 2012, moritz wrote​:

10​:53 < moritz> r​: try { say $_ } for <1 2>
10​:53 <+p6eval> rakudo bd6742​: OUTPUT«Any()␤Any()␤»

should be 1\n2\n

10​:53 < moritz> r​: try say $_ for <1 2>
10​:53 <+p6eval> rakudo bd6742​: OUTPUT«1␤2␤»
10​:53 < moritz> ok, only the block case

Same with given​:

10​:55 < moritz> r​: try { say $_ } given 2
10​:55 <+p6eval> rakudo bd6742​: OUTPUT«Any()␤»

Both the for and given cases are fixed now. Added tests to S04-statement-modifiers/for.t and S04-statement-modifiers/given.t.

@p6rt p6rt closed this as completed Apr 28, 2015
@p6rt
Copy link
Author

p6rt commented Apr 28, 2015

@jnthn - Status changed from 'open' 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