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

Mutate regexps in form /\Astatic/ to String#start_with? #169

Closed
mbj opened this issue Apr 3, 2014 · 0 comments · Fixed by #1201
Closed

Mutate regexps in form /\Astatic/ to String#start_with? #169

mbj opened this issue Apr 3, 2014 · 0 comments · Fixed by #1201

Comments

@mbj
Copy link
Owner

mbj commented Apr 3, 2014

No description provided.

dgollahon added a commit that referenced this issue Jan 3, 2021
- Adds the following mutations:
  * `a.match(/\Atext/)` -> `b.start_with?('text')`
  * `a.match?(/\Atext/)` -> `b.start_with?('text')`
  * `a =~ /\Atext/` -> `b.start_with?('text')`
- NOTE: Adds a `Mutant::AST::Regexp.expand_regexp_ast` to avoid repeating AST expansion logic in the `send` mutator. At that level, the node appears as a simple `parser` `s(:regexp ...)` node so I chose to fully parse the regexp rather than try to do a string pattern.
- Closes #169
dgollahon added a commit that referenced this issue Jan 3, 2021
- Adds the following mutations:
  * `a.match(/\Atext/)` -> `b.start_with?('text')`
  * `a.match?(/\Atext/)` -> `b.start_with?('text')`
  * `a =~ /\Atext/` -> `b.start_with?('text')`
- NOTE: Adds a `Mutant::AST::Regexp.expand_regexp_ast` to avoid repeating AST expansion logic in the `send` mutator. At that level, the node appears as a simple `parser` `s(:regexp ...)` node so I chose to fully parse the regexp rather than try to do a string pattern.
- Closes #169
dgollahon added a commit that referenced this issue Jan 7, 2021
- Adds the following mutations:
  * `a.match(/\Atext/)` -> `b.start_with?('text')`
  * `a.match?(/\Atext/)` -> `b.start_with?('text')`
  * `a =~ /\Atext/` -> `b.start_with?('text')`
- NOTE: Adds a `Mutant::AST::Regexp.expand_regexp_ast` to avoid repeating AST expansion logic in the `send` mutator. At that level, the node appears as a simple `parser` `s(:regexp ...)` node so I chose to fully parse the regexp rather than try to do a string pattern.
- Closes #169
dgollahon added a commit that referenced this issue Jan 7, 2021
- Adds the following mutations:
  * `a.match(/\Atext/)` -> `b.start_with?('text')`
  * `a.match?(/\Atext/)` -> `b.start_with?('text')`
  * `a =~ /\Atext/` -> `b.start_with?('text')`
- NOTE: Adds a `Mutant::AST::Regexp.expand_regexp_ast` to avoid repeating AST expansion logic in the `send` mutator. At that level, the node appears as a simple `parser` `s(:regexp ...)` node so I chose to fully parse the regexp rather than try to do a string pattern.
- Closes #169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant