exercism / problem-specifications

Shared metadata for exercism exercises.
MIT License
320 stars 540 forks source link

fix: prevent matching STOP in a valid non-STOP sequence #2458

Closed barabo closed 2 weeks ago

barabo commented 2 weeks ago

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
github-actions[bot] commented 2 weeks ago

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 commented 2 weeks ago

Originally created (in error) in the jq track: https://github.com/exercism/jq/pull/242

barabo commented 2 weeks ago

Thanks for the quick review!