mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Use JRuby implementation for TruffleRuby (#149)
Fix GH-145 Rename `lib/fiddle/jruby.rb` to `lib/fiddle/ffi_backend.rb` as a generic ffi gem API based implementation. JRuby and TruffleRuby use `lib/fiddle/ffi_backend.rb`. --------- Co-authored-by: Benoit Daloze <eregontp@gmail.com>
This commit is contained in:
parent
bbd5b8ddae
commit
8d127c9b59
13 changed files with 155 additions and 108 deletions
|
@ -6,8 +6,8 @@ end
|
|||
|
||||
class TestFiddle < Fiddle::TestCase
|
||||
def test_nil_true_etc
|
||||
if RUBY_ENGINE == "jruby"
|
||||
omit("Fiddle::Q* aren't supported with JRuby")
|
||||
if ffi_backend?
|
||||
omit("Fiddle::Q* aren't supported with FFI backend")
|
||||
end
|
||||
|
||||
assert_equal Fiddle::Qtrue, Fiddle.dlwrap(true)
|
||||
|
@ -30,6 +30,10 @@ class TestFiddle < Fiddle::TestCase
|
|||
if Dir.glob("/usr/lib/*/libncurses.so").empty?
|
||||
omit("libncurses.so is needed")
|
||||
end
|
||||
if ffi_backend?
|
||||
omit("Fiddle::Handle#file_name doesn't exist in FFI backend")
|
||||
end
|
||||
|
||||
# libncurses.so uses INPUT() on Debian GNU/Linux
|
||||
# $ cat /usr/lib/x86_64-linux-gnu/libncurses.so
|
||||
# INPUT(libncurses.so.6 -ltinfo)
|
||||
|
@ -44,6 +48,10 @@ class TestFiddle < Fiddle::TestCase
|
|||
|
||||
def test_dlopen_linker_script_group_linux
|
||||
omit("This is only for Linux") unless RUBY_PLATFORM.match?("linux")
|
||||
if ffi_backend?
|
||||
omit("Fiddle::Handle#file_name doesn't exist in FFI backend")
|
||||
end
|
||||
|
||||
# libc.so uses GROUP() on Debian GNU/Linux
|
||||
# $ cat /usr/lib/x86_64-linux-gnu/libc.so
|
||||
# /* GNU ld script
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue