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

Failed ()? captures should be Nil in Rakudo (nqp-rx) #2352

Closed
p6rt opened this issue Feb 6, 2011 · 9 comments
Closed

Failed ()? captures should be Nil in Rakudo (nqp-rx) #2352

p6rt opened this issue Feb 6, 2011 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Feb 6, 2011

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

Searchable as RT83508$

@p6rt
Copy link
Author

p6rt commented Feb 6, 2011

From @masak

<dalek> specs​: a56ffc3 | larry++ | S (2 files)​:
<dalek> specs​: make ?/* semantics consistently Nil/()
<dalek> specs​: review​: Raku/old-design-docs@a56ffc33ac
<TimToady> rakudo​: 'x' ~~ /(y)? (z)*/; say $0.defined, $1.defined;
<p6eval> rakudo 684fdf​: OUTPUT«Bool​::TrueBool​::True␤»
<TimToady> that should be False True
<TimToady> by the new rules
* masak submits rakudobug
<TimToady> and actually, the first was supposed to be False already by
the old spec

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

From @bbkr

2011.09 build

bbkr​:rakudo-2011.09 bbkr$ ./perl6 -e '"x" ~~ /(y)? (z)*/; say
$0.defined, $1.defined;'
Bool​::FalseBool​::False

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

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

@p6rt
Copy link
Author

p6rt commented Oct 21, 2012

From @coke

On Sat Oct 01 02​:02​:50 2011, bbkr wrote​:

2011.09 build

bbkr​:rakudo-2011.09 bbkr$ ./perl6 -e '"x" ~~ /(y)? (z)*/; say
$0.defined, $1.defined;'
Bool​::FalseBool​::False

Changed again, but still wrong per Larry's comment​:

./perl6 -e '"x" ~~ /(y)? (z)*/; say 0.defined, $1.defined;'
TrueTrue

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Dec 29, 2013

From @timo

It gives the right output nowadays​:

"x" ~~ /(y)? (z)*/; say $0.defined; say $1.defined;
False
True

I'll mark this testneeded, but there's probably tests in roast that cover this.

@p6rt
Copy link
Author

p6rt commented Jan 14, 2014

From @coke

On Sun Dec 29 09​:38​:52 2013, timo wrote​:

It gives the right output nowadays​:

"x" ~~ /(y)? (z)*/; say $0.defined; say $1.defined;
False
True

I'll mark this testneeded, but there's probably tests in roast that
cover this.

... And now it gives the wrong output again, TrueTrue.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 14, 2014

From @usev6

This works now (again)​:

$ perl6-m -e '"x" ~~ /(y)? (z)*/; say $0.defined; say $1.defined;'
False
True

I added a test to S05-match/capturing-contexts.t with the following commit​: Raku/roast@ae245a65f6

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 14, 2014

From @usev6

This works now (again)​:

$ perl6-m -e '"x" ~~ /(y)? (z)*/; say $0.defined; say $1.defined;'
False
True

I added a test to S05-match/capturing-contexts.t with the following commit​: Raku/roast@ae245a65f6

@p6rt
Copy link
Author

p6rt commented Oct 14, 2014

@usev6 - 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