fiddle 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96a73d1da87f69ec3f4aae33ed5a80ac8c920eb69fd93d91fb2d68c6ad0189af
4
- data.tar.gz: 50a145cd8275945f292bd8a82184d5955d64ef75a1ed44601daffc6716196dac
3
+ metadata.gz: 8958948f3661cb522847c81b79d663a5748cd54df277ede3ec29d74b0fe6f223
4
+ data.tar.gz: 273a20dc863a31915bc6d6b7653bdf5ce9e55061aea00a08b17996f26dd19ebd
5
5
  SHA512:
6
- metadata.gz: 2d1dda953aab9d5cb9fef0e0f437accfdf9c2cc891cc7319a2d53726d6e71570248a0a5b2308a18d75b7737e6667e798e404d0b5bdab2ad50d88106a061c74a6
7
- data.tar.gz: d4da3f220dfcbae91f58fd958de75746918a8bf20b1bedc342d99bfbeb3885d124bfece0c7c21523478b0d0c3f961a30b0a5103c65b8263dc37b03ddbc5db47a
6
+ metadata.gz: a888a14cd08bd3f3fa860953752d35e4ddab070b5337db8f0468f3038b520c3bce7a0f82e84c35e62d49d123a4e1650e8d5c66da48fa76933404fa5d6bf91240
7
+ data.tar.gz: d5206fda047f3fb5136f52025d683703b9c84de053d5f843347aad5144deaa8d81e2c02457ce7d325b1078ff2563470fd90576d4c876189c0830f24da9655dda
@@ -1,11 +1,19 @@
1
1
  # frozen_string_literal: true
2
- require 'mkmf'
2
+
3
+ require "rbconfig"
3
4
 
4
5
  unless RUBY_ENGINE == "ruby"
5
- File.write('Makefile', dummy_makefile("").join)
6
+ File.write('Makefile', <<-MAKEFILE)
7
+ all install clean:
8
+ #{RbConfig::CONFIG["NULLCMD"]}
9
+
10
+ .PHONY: all install clean
11
+ MAKEFILE
6
12
  return
7
13
  end
8
14
 
15
+ require 'mkmf'
16
+
9
17
  # :stopdoc:
10
18
 
11
19
  def gcc?
@@ -68,11 +76,6 @@ unless bundle
68
76
  end
69
77
  if have_ffi_header && (have_library('ffi') || have_library('libffi'))
70
78
  have_libffi = true
71
- checking_for("undefined FFI_GO_CLOSURES is used") do
72
- if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1")
73
- $defs.push('-DFFI_GO_CLOSURES=0')
74
- end
75
- end
76
79
  end
77
80
  end
78
81
 
data/ext/fiddle/fiddle.h CHANGED
@@ -40,6 +40,7 @@
40
40
  # endif
41
41
  #endif
42
42
 
43
+ #define FFI_GO_CLOSURES 0 /* fiddle does not use go closures */
43
44
  #ifdef USE_HEADER_HACKS
44
45
  #include <ffi/ffi.h>
45
46
  #else
@@ -475,8 +475,11 @@ module Fiddle
475
475
  RTLD_NOW = FFI::DynamicLibrary::RTLD_NOW
476
476
 
477
477
  def initialize(libname = nil, flags = RTLD_LAZY | RTLD_GLOBAL)
478
- @lib = FFI::DynamicLibrary.open(libname, flags) rescue LoadError
479
- raise DLError.new("Could not open #{libname}") unless @lib
478
+ begin
479
+ @lib = FFI::DynamicLibrary.open(libname, flags)
480
+ rescue LoadError, RuntimeError # LoadError for JRuby, RuntimeError for TruffleRuby
481
+ raise DLError, "Could not open #{libname}"
482
+ end
480
483
 
481
484
  @open = true
482
485
 
@@ -1,3 +1,3 @@
1
1
  module Fiddle
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
8
8
  - SHIBATA Hiroshi
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-11 00:00:00.000000000 Z
11
+ date: 2024-10-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A libffi wrapper for Ruby.
14
14
  email: