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

Modernize the gem and fix Ruby 3.2 compat #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casperisfine
Copy link

The gem no longer compiles on modern rubies, mostly on macOS with newer clang:

compiling levenshtein.c
levenshtein.c:24:23: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
    if (!len1) return len2;
               ~~~~~~ ^~~~
levenshtein.c:25:23: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
    if (!len2) return len1;
               ~~~~~~ ^~~~
2 warnings generated.

(NB: returning an unsigned long might make more sense)

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