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

Nil check #3

Merged
merged 2 commits into from
Aug 9, 2012
Merged

Nil check #3

merged 2 commits into from
Aug 9, 2012

Conversation

harbu
Copy link

@harbu harbu commented Dec 22, 2011

Fixed the "segmentation fault on nil arguments" issue by adding a check that the given arguments are really strings. If given something else will raise a TypeError. I also updated RSpec to version 2.

end

# Unsafe version. Results in a segmentation fault if passed nils!
attach_function :ffi_distance, :levenshtein, [:string, :string], :int
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, If you want to make this private, you can do: private :ffi_distance after the declaration. Let me know if you want to do this before I merge! Thanks!

@acanyon
Copy link

acanyon commented Aug 7, 2012

@dbalatero @harbu Is there anyway we can get this merged?

@dbalatero
Copy link
Owner

hey! thanks for the nudge - i'll try to get to it tonight.

@dbalatero dbalatero merged commit 596131a into dbalatero:master Aug 9, 2012
@dbalatero
Copy link
Owner

merged, releasing a 1.0.3 gem shortly.

@dbalatero
Copy link
Owner

1.0.3 is 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.

3 participants