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

A regex match in a 'when' clause doesn't set $/ properly in Rakudo #2481

Closed
p6rt opened this issue Sep 24, 2011 · 5 comments
Closed

A regex match in a 'when' clause doesn't set $/ properly in Rakudo #2481

p6rt opened this issue Sep 24, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Sep 24, 2011

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

Searchable as RT99912$

@p6rt
Copy link
Author

p6rt commented Sep 24, 2011

From @masak

<japhb> rakudo​: given "a" { if /^(a)$/ { say $0 } }
<p6eval> rakudo aed9fe​: OUTPUT«a␤»
<japhb> rakudo​: given "a" { when /^(a)$/ { say $0 } }
<p6eval> rakudo aed9fe​: OUTPUT«Nil␤»
<japhb> ^^ known?
<masak> b​: given "a" { when /^(a)$/ { say $0 } }
<p6eval> b 1b7dd1​: OUTPUT«a␤»
<masak> japhb​: probably part of the whole regexes not being quite done
in nom yet thing.
<japhb> masak, nodnod. Strange effect though. I wouldn't expect a
difference between those two.
<masak> indeed.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Dec 13, 2011

From @jnthn

On Sat Sep 24 14​:17​:45 2011, masak wrote​:

<japhb> rakudo​: given "a" { if /^(a)$/ { say $0 } }
<p6eval> rakudo aed9fe​: OUTPUT«a␤»
<japhb> rakudo​: given "a" { when /^(a)$/ { say $0 } }
<p6eval> rakudo aed9fe​: OUTPUT«Nil␤»
<japhb> ^^ known?
<masak> b​: given "a" { when /^(a)$/ { say $0 } }
<p6eval> b 1b7dd1​: OUTPUT«a␤»
<masak> japhb​: probably part of the whole regexes not being quite done
in nom yet thing.
<japhb> masak, nodnod. Strange effect though. I wouldn't expect a
difference between those two.
<masak> indeed.
* masak submits rakudobug

given "a" { when /^(a)$/ { say $0 } }
=> <a>

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Dec 13, 2011

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

@p6rt
Copy link
Author

p6rt commented Jan 30, 2012

From @moritz

Now tested in S04-statements/given.t.

@p6rt
Copy link
Author

p6rt commented Jan 30, 2012

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