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

allow constant string argument in .comb in Rakudo #3672

Closed
p6rt opened this issue Feb 8, 2015 · 4 comments
Closed

allow constant string argument in .comb in Rakudo #3672

p6rt opened this issue Feb 8, 2015 · 4 comments
Labels
NYI Features not yet implemented

Comments

@p6rt
Copy link

p6rt commented Feb 8, 2015

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

Searchable as RT123760$

@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

From @masak

<masak> m​: say "foo".comb(/o/)
<camelia> rakudo-moar d9f58f​: OUTPUT«o o␤»
<masak> m​: say "foo".comb('o')
<camelia> rakudo-moar d9f58f​: OUTPUT«Cannot call 'comb' [...]»
* masak suggests the latter form work, too
<masak> reason​: I saw some code I had written where I had a regex with
just a literal string in it. I thought "hey, I ought to be able to get
away with writing just the string here..."
<masak> didn't work.
<colomon> +1
<colomon> just a string does work with subst.
<colomon> m​: say "foo".subst("o","e")
<camelia> rakudo-moar d9f58f​: OUTPUT«feo␤»
<masak> colomon​: good point.
* masak submits NYI rakudobug

@p6rt
Copy link
Author

p6rt commented Aug 27, 2015

From @coke

On Sun Feb 08 08​:25​:26 2015, masak wrote​:

<masak> m​: say "foo".comb(/o/)
<camelia> rakudo-moar d9f58f​: OUTPUT«o o␤»
<masak> m​: say "foo".comb('o')
<camelia> rakudo-moar d9f58f​: OUTPUT«Cannot call 'comb' [...]»
* masak suggests the latter form work, too
<masak> reason​: I saw some code I had written where I had a regex with
just a literal string in it. I thought "hey, I ought to be able to get
away with writing just the string here..."
<masak> didn't work.
<colomon> +1
<colomon> just a string does work with subst.
<colomon> m​: say "foo".subst("o","e")
<camelia> rakudo-moar d9f58f​: OUTPUT«feo␤»
<masak> colomon​: good point.
* masak submits NYI rakudobug

Added; updated the already existing tests in S32-str/comb.t to include some more conditions.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 27, 2015

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

@p6rt
Copy link
Author

p6rt commented Aug 27, 2015

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

@p6rt p6rt closed this as completed Aug 27, 2015
@p6rt p6rt added the NYI Features not yet implemented label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NYI Features not yet implemented
Projects
None yet
Development

No branches or pull requests

1 participant