-
Notifications
You must be signed in to change notification settings - Fork 1
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
Segmentation fault on non-strings #1
Comments
What version of the gem are you using? I can reproduce the segfault on 0.2.0, but on 0.3.1 I get a TypeError:
|
Hi there! I have whatever version is installed by
|
Strange, 0.3.1 was pushed to rubygems.org before today so you should have gotten that version. If you didn't give a specific version in |
Good thought, manually installing with I then completely deleted all traces of unnatural from my system and Gemfile, re-ran bundler, added unnatural back to my Gemfile and ran bundler again, and it still installed I went to a non-rvm locked directory and made a new Gemfile, and it installed 0.3.1. That's with Maybe it's a dependency thing. |
Further investigation, I added
This seems to be the culprit: https://github.com/bjmllr/unnatural/blob/669c8e9/unnatural.gemspec#L26 |
I have removed that line and released a new version (0.3.2). Does this fix the problem for you? rake is still a runtime dependency since ffi-compiler uses it, but there should be no version restriction any more. |
Thanks for this gem, it's much faster than any of the other ones.
We've run into an issue that is easy to work around but I thought it worth reporting so it can have a better check than a segfault.
Issue: Passing an array of non-strings creates a segfault.
Expectation: Error message, exception, or automatic conversion to string.
Actual: the Ruby interpreter dies, taking the whole server down with it.
Reproduce:
We can, of course, use
to_s
withsort_by
but I don't think it should break everything with the wrong type. 😄The text was updated successfully, but these errors were encountered: