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 ISBN.ten method to handle 10 digit isbns starting with 979 #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mmhiyoko
Copy link

@mmhiyoko mmhiyoko commented Jun 9, 2023

When passing a 10 digit isbn starting with 979 to the current ISBN.ten method, it throws a No10DigitISBNAvailable exception.
However, 10 digit isbns starting with 979 are valid according to the specifications, and there are actual books that have them.
Example: https://www.goodreads.com/book/show/1038257.Tirai_Menurun.
I have made the fixes in this Pull Request, so please review.

@mmhiyoko mmhiyoko changed the title Enable ISBN.ten method to handle 10 digit isbns starting with 979 Fix ISBN.ten method to handle 10 digit isbns starting with 979 Jun 9, 2023
@tkersey
Copy link
Owner

tkersey commented Jun 9, 2023

@mmhiyoko thanks for bringing this flaw to my attention. I was a bit myopic in my original design not considering this use case. I'll try to review this PR this weekend and issue a new release if everything works out.

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.

2 participants