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
Add TruffleRuby in CI and skip the few specs which are not yet supported on TruffleRuby #755
Conversation
|
I can split the long double change in another PR if you prefer (it's just a rename currently) |
* This is generally handled in FFI::Pointer #write/#put methods.
* Happens when running spec/ffi/long_double_spec.rb: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
bb33ee8
to
a3e1b2a
Compare
* Define a no-op :compile task on other Rubies so the code doesn't need many conditions.
LGTM, I'll merge this. It's probably better to separate the coerce test from the other struct tests. I'll open a PR for review. |
I'll rebase this to get the CI fixes. There are still a few issues preventing the CI to pass on TruffleRuby, I'll keep working on it: https://travis-ci.org/github/ffi/ffi/builds/667891953 |
@larskanis I see you merged it manually to master, thanks! |
@@ -41,7 +41,9 @@ rbffi_num2longdouble(VALUE value) | |||
|
|||
if (RTEST(rb_cBigDecimal) && rb_cBigDecimal != rb_cObject && RTEST(rb_obj_is_kind_of(value, rb_cBigDecimal))) { | |||
VALUE s = rb_funcall(value, rb_intern("to_s"), 1, rb_str_new2("E")); | |||
return strtold(RSTRING_PTR(s), NULL); | |||
long double ret = strtold(RSTRING_PTR(s), NULL); | |||
RB_GC_GUARD(s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required in Truffleruby? In MRI there is no need for a guard here IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's not, TruffleRuby doesn't use the C extension for FFI.
I did it to try to debug this long double failure on Windows.
Why is it not needed on MRI, couldn't s
be GC'd during the strtold
call?
On macOS, it fails because TravisCI uses a too old version on macOS (10.13): On Linux I need to add the new LONG_DOUBLE_SIZE constant in TruffleRuby, since it was added in the C extension. |
Also adding a few extra specs and fixing the
long double
spec to actually run.See the individual commit messages for details.
Part of #660 (comment)