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

bugfix: instance reuse when levenshtein dp changes size #4

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

avioli
Copy link
Contributor

@avioli avioli commented Aug 26, 2020

If I reuse the Woozy instance (which holds an instance of Levenshtein), then it throws a RangeError, when its internal "dynamic programming array" (isn't this a matrix?) gets resized.

See test.

I wasn't sure if the _levenshtein._dp should only grow or should it be able to shrink, so... I picked the former - only growing.

@yzhong52
Copy link
Contributor

LGTM!

@yzhong52 yzhong52 merged commit d9146c0 into IvoriApp:master Aug 27, 2020
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