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

Can't regex-match on a junction of strings in Rakudo #2533

Closed
p6rt opened this issue Nov 7, 2011 · 6 comments
Closed

Can't regex-match on a junction of strings in Rakudo #2533

p6rt opened this issue Nov 7, 2011 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 7, 2011

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

Searchable as RT103106$

@p6rt
Copy link
Author

p6rt commented Nov 7, 2011

From @masak

<masak> rakudo​: say "foo" & "a nice old foo" ~~ /foo/
<p6eval> rakudo 95371a​: OUTPUT«This type cannot unbox to a native string [...]
<masak> b​: say "foo" & "a nice old foo" ~~ /foo/
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤»
<masak> niecza​: say "foo" & "a nice old foo" ~~ /foo/
<p6eval> niecza v11-22-gbebf7a0​: OUTPUT«all(#<match from(0) to(3)
text(foo) pos([].list) named({}.hash)>, #<match from(11) to(14)
text(foo) pos([].list) named({}.hash)>)␤»
* masak submits rakudobug

I'm not sure why b's output boolifies there. I like Niecza's result
better. nom's error seems based on a misunderstanding -- the regexp
matcher shouldn't be seeing a junction, because the junctional value
should've autothreaded into individual strings at that point.

@p6rt
Copy link
Author

p6rt commented Aug 29, 2015

From @coke

On Mon Nov 07 07​:28​:26 2011, masak wrote​:

<masak> rakudo​: say "foo" & "a nice old foo" ~~ /foo/
<p6eval> rakudo 95371a​: OUTPUT«This type cannot unbox to a native
string [...]
<masak> b​: say "foo" & "a nice old foo" ~~ /foo/
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤»
<masak> niecza​: say "foo" & "a nice old foo" ~~ /foo/
<p6eval> niecza v11-22-gbebf7a0​: OUTPUT«all(#<match from(0) to(3)
text(foo) pos([].list) named({}.hash)>, #<match from(11) to(14)
text(foo) pos([].list) named({}.hash)>)␤»
* masak submits rakudobug

I'm not sure why b's output boolifies there. I like Niecza's result
better. nom's error seems based on a misunderstanding -- the regexp
matcher shouldn't be seeing a junction, because the junctional value
should've autothreaded into individual strings at that point.

Behavior has changed, but not for the better​:

07​:32 < [Coke]> m​: say "foo" & "a nice old foo" ~~ /foo/
07​:32 < GLRelia> rakudo-moar ec355f​: OUTPUT«␤»
07​:32 <+camelia> rakudo-moar fd1612​: OUTPUT«「all(Failure.new(exception => X​::OutOfRange.new(what => "Start argument to substr",
  got => "5", range => "0..3", comment => "use *5 if you want to index relative to the end"), backtrace =>
  Backtrace.new), "e o")」␤»

Note that while nom fails, glr doesn't match.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 29, 2015

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

@p6rt
Copy link
Author

p6rt commented Oct 20, 2015

From @FROGGS

Patch​: rakudo/rakudo@5d83db3d01
Tests​: Raku/roast@51d1a4835f

Closing ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 20, 2015

From @FROGGS

Patch​: rakudo/rakudo@5d83db3d01
Tests​: Raku/roast@51d1a4835f

Closing ticket.

@p6rt
Copy link
Author

p6rt commented Oct 20, 2015

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

@p6rt p6rt closed this as completed Oct 20, 2015
@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