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: prevent matching STOP in a valid non-STOP sequence #2458

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

barabo
Copy link
Contributor

@barabo barabo commented Jun 24, 2024

When AUG and AUG (also UUA and AUG) are combined, they contain a substring that potentially matches a STOP codon. A naive implementation may falsely match the non-STOP sequence as a STOP codon.

This simple test covers a gap in the current suite.

  AUGAUG
   ^^^ - not a STOP codon

  UUAAUG
   ^^^ - not a STOP codon

When `AUG` and `AUG` (also `UUA` and `AUG`) are combined, they contain a substring that potentially matches a STOP codon.  A naive implementation may falsely match the non-STOP sequence as a STOP codon.

This simple test covers a gap in the current suite.
Copy link
Contributor

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@barabo
Copy link
Contributor Author

barabo commented Jun 24, 2024

Originally created (in error) in the jq track: exercism/jq#242

@BNAndras BNAndras reopened this Jun 24, 2024
Co-authored-by: András B Nagy <[email protected]>
@kotp kotp merged commit 87bd801 into exercism:main Jun 24, 2024
7 checks passed
@barabo barabo deleted the patch-1 branch June 24, 2024 22:59
@barabo
Copy link
Contributor Author

barabo commented Jun 24, 2024

Thanks for the quick review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants