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 bug with -is-suffix? #384

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Fix bug with -is-suffix? #384

merged 2 commits into from
Aug 26, 2021

Conversation

brennier
Copy link
Contributor

The current implementation of -is-suffix? tries to find the first element of list that matches the first element of suffix and then checks to see if the rest of list matches suffix. However, this means that examples like (-is-suffix? '(a b) '(a c a b)) evaluate to false, which should be a bug. This new implementation fixes the bug.

@basil-conto basil-conto added the bug Existing behavior is incorrect label Aug 26, 2021
brennier and others added 2 commits August 26, 2021 12:25
* dash.el (-is-suffix?): Don't assume that first element of suffix
appears only once (PR magnars#384).  This fixes a regression in v2.18.0.

Copyright-paperwork-exempt: yes
* NEWS.md (2.19.1): Announce fix for -is-suffix-p regression.
(2.19.0): Refill.

* dev/examples.el (-is-suffix?): Test for regression.
@basil-conto
Copy link
Collaborator

basil-conto commented Aug 26, 2021

Thanks for catching this, and sorry about this blunder!

I'll cut 2.19.1 as a bugfix release shortly.

@basil-conto basil-conto added this to the 2.19.1 milestone Aug 26, 2021
@basil-conto basil-conto self-assigned this Aug 26, 2021
basil-conto added a commit that referenced this pull request Aug 26, 2021
* dash.el: Bump to version 2.19.1.
* README.md:
* dash.texi: Regenerate docs.

Re: #384.
@basil-conto
Copy link
Collaborator

I'll cut 2.19.1 as a bugfix release shortly.

Done: https://github.com/magnars/dash.el/releases/tag/2.19.1

Should be live on GNU ELPA and GNU-devel ELPA within a few hours.

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

Successfully merging this pull request may close these issues.

None yet

2 participants