-
Notifications
You must be signed in to change notification settings - Fork 40
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
Use JRuby implementation for TruffleRuby #149
Changes from 1 commit
418bd89
0631d46
fc3be9c
41c21f5
bf06273
3e11fad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
eregon marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require_relative 'jruby' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,12 @@ | |
|
||
module Fiddle | ||
class TestClosure < Fiddle::TestCase | ||
def setup | ||
if RUBY_ENGINE == "truffleruby" | ||
omit("FFI::Function don't accept #call-able object with TruffleRuby") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll look into this, TruffleRuby does pass most FFI gem tests so it's surprising, maybe this is not well tested or is not an officially supported API. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 41c21f5 so all such tests pass now |
||
end | ||
end | ||
|
||
def teardown | ||
super | ||
# We can't use ObjectSpace with JRuby. | ||
|
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.
I think it would be good to rename this file to
ffi_backend.rb
or so and avoid a JRuby namespace since it is effectively independent from JRuby but it doesn't like that currently due to file naming and things likeFiddle::JRuby
.It's helpful to have a small diff at this point though, so I think that's best done later, maybe even in a separate PR.
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.
I think that we don't need to do it because this is a short-term workaround for TruffleRuby.
This file will be used by only JRuby eventually.
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.
Since the FFI backend seems to work well I think we should just use it long term, for both JRuby and TruffleRuby.
It's also nice to have 2 backends instead of 3.