From f2bcdc7283f2137e0916e251df3a52c40b1f6151 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 27 Jun 2020 11:01:22 +0900 Subject: [ruby/fiddle] Support MSWIN (#43) https://github.com/ruby/fiddle/commit/f16e7ff6e0 --- test/fiddle/test_func.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/fiddle/test_func.rb') diff --git a/test/fiddle/test_func.rb b/test/fiddle/test_func.rb index 376f8786da..cf71a4b123 100644 --- a/test/fiddle/test_func.rb +++ b/test/fiddle/test_func.rb @@ -86,7 +86,12 @@ module Fiddle else snprintf_name = "snprintf" end - snprintf = Function.new(@libc[snprintf_name], + begin + snprintf_pointer = @libc[snprintf_name] + rescue Fiddle::DLError + skip "Can't find #{snprintf_name}: #{$!.message}" + end + snprintf = Function.new(snprintf_pointer, [ TYPE_VOIDP, TYPE_SIZE_T, -- cgit v1.2.3