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

Fix a bug in contain matcher with regexp. #227

Merged
merged 1 commit into from Aug 10, 2013

Conversation

Projects
None yet
2 participants
@ryotarai
Contributor

ryotarai commented Aug 9, 2013

Regexp#to_s behaves like the following:

[1] pry(main)> /^hello$/.to_s
=> "(?-mix:^hello$)"

-mix means disabling m, i and x options.
To use these options, we should use grep -P (perl regexp) instead of grep.
But grep -P is highly experimental and grep -P may warn of unimplemented features.

So I use Regexp#source instead of Regexp#to_s.
Regexp#source behaves like the following:

[2] pry(main)> /^hello$/.source
=> "^hello$"
Fix a bug in contain matcher with regexp.
Use Regexp#source instead of Regexp#to_s.

@ryotarai ryotarai closed this Aug 9, 2013

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Aug 9, 2013

Owner

Did you close this issue by mistake?

Owner

mizzy commented Aug 9, 2013

Did you close this issue by mistake?

@ryotarai

This comment has been minimized.

Show comment
Hide comment
@ryotarai

ryotarai Aug 10, 2013

Contributor

I'm sorry that I closed this pull request temporarily because I wondered this is implemented in a correct way.
I reopened now. Please merge this.

Contributor

ryotarai commented Aug 10, 2013

I'm sorry that I closed this pull request temporarily because I wondered this is implemented in a correct way.
I reopened now. Please merge this.

@ryotarai ryotarai reopened this Aug 10, 2013

mizzy added a commit that referenced this pull request Aug 10, 2013

Merge pull request #227 from ryotarai/fix-grep-with-regexp
Fix a bug in contain matcher with regexp.

@mizzy mizzy merged commit ffce49a into mizzy:master Aug 10, 2013

1 check passed

default The Travis CI build passed
Details
@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Aug 10, 2013

Owner

Thanks.I've merged and released as v0.7.7.

Owner

mizzy commented Aug 10, 2013

Thanks.I've merged and released as v0.7.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment