aboutsummaryrefslogtreecommitdiffstats
path: root/test/fiddle
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-28 10:34:01 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-28 10:40:31 +0900
commit48fb6299c6ad4fe970c05c5e30a0f6284d771164 (patch)
treefb733e82b49a27c61b2110eccb434b06446dc2d1 /test/fiddle
parent0703e014713ae92f4c8a2b31e385718dc2452eac (diff)
downloadruby-48fb6299c6ad4fe970c05c5e30a0f6284d771164.tar.gz
[ruby/fiddle] support for very old libffi
Define `Fiddle::TYPE_VARIADIC` only when `ffi_prep_cif_var` is available, otherwise skip the test for it.
Diffstat (limited to 'test/fiddle')
-rw-r--r--test/fiddle/test_func.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/fiddle/test_func.rb b/test/fiddle/test_func.rb
index cf71a4b123..29a0a455f1 100644
--- a/test/fiddle/test_func.rb
+++ b/test/fiddle/test_func.rb
@@ -81,6 +81,9 @@ module Fiddle
end
def test_snprintf
+ unless Fiddle.const_defined?("TYPE_VARIADIC")
+ skip "libffi doesn't support variadic arguments"
+ end
if Fiddle::WINDOWS
snprintf_name = "_snprintf"
else