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

Fix else/if branch deletion on ternary unparse #1376

Merged
merged 4 commits into from
May 6, 2023
Merged

Fix else/if branch deletion on ternary unparse #1376

merged 4 commits into from
May 6, 2023

Conversation

mbj
Copy link
Owner

@mbj mbj commented May 6, 2023

  • If its guaranteed the original code must have been a ternary, and thus will also be unparsed as a ternary: Mutant cannot delete the if or else branches.
  • If its not guaranteed the original code was a ternary mutant can freely produce AST without if or else branch and unparser will know on how to generate equivalent AST.

Fixes the crashing case from: #1374 but with a smaller more localized reproduction.

@mbj mbj self-assigned this May 6, 2023
@mbj mbj added the maintenance label May 6, 2023
@mbj mbj requested a review from dgollahon May 6, 2023 21:14
@mbj mbj force-pushed the fix/dispatch branch 2 times, most recently from c781b9c to bdde556 Compare May 6, 2023 21:28
mbj added 4 commits May 6, 2023 21:41
* But leave 3.1.2 explicit as it requires a special workaround due to a change
  between 3.1.2 and 3.1.3.
* Github runners for macosx have very high latency so using them for every
  build item slows development down significantly on CI times.
* This reduces the macosx coverage to feedback where the macosx ruby platform
  has a chance to derivate and has cause unexpected issues:
  isolation tests, unit specs and mutant self coverage.
* If its guaranteed the original code must have been a ternary, and
  thus will also be unparsed as a ternary: Mutant cannot delete the
  if or else branches.
* If its not guaranteed the original code was a ternary mutant can freely
  produce AST without if or else branch and unparser will know on how to
  generate equivalent AST.
@mbj mbj force-pushed the fix/dispatch branch 3 times, most recently from 8f6605e to 8bc90a9 Compare May 6, 2023 22:04
@mbj mbj merged commit f02518c into main May 6, 2023
@mbj mbj deleted the fix/dispatch branch May 6, 2023 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant