ffi 1.9.12-x64-mingw32 → 1.9.13-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3763b8d3765c5cf32f3a495e61390da702864c89
4
- data.tar.gz: 02df6497f630a1eb4b48b6fead05c3a2abf67282
3
+ metadata.gz: e2b17f5b40e60f2fd8c48d4456ed03ae5bb185d0
4
+ data.tar.gz: 4279ca220d55a076c1140ac9e0e76b9b9062d06b
5
5
  SHA512:
6
- metadata.gz: dc56794eae34134d0263ffee21154bb884564e334baf6143e5847e5416b433bd3e37efbc0b08b25e4ccffd3568b1a89b3124a9a8986d37ff00e3ada6558cdd95
7
- data.tar.gz: 48abf913371b8428ee630aef623daca19d8aaf79944e739bb959fff65278ac26df07edab70333a5bfb1a1b9196c579e626a5c779d75c1477aaae4fbeb85f88cf
6
+ metadata.gz: 8e22f412c90c089fa06706c8a996e277d75a3bf61f84f57beeca81793ffc253ec1bb3bed5206f310118e26944093202b86415f788ec957b0b6ab3f106442f5dd
7
+ data.tar.gz: 2aa3cb5131810bd29cc8786d87aa37120eea39d07adda31576b4f85bd60af5ac22f41c40ac7fe8409800cb9107cdf64bfeb7363129903675456f5dbc7aa18657
Binary file
Binary file
Binary file
@@ -122,20 +122,21 @@ module FFI
122
122
  end
123
123
  end
124
124
 
125
- # TODO better library lookup logic
126
- unless libname.to_s.start_with?("/")
127
- path = ['/usr/lib/','/usr/local/lib/'].find do |pth|
128
- File.exist?(pth + libname)
129
- end
130
- if path
131
- libname = path + libname
132
- retry
133
- end
134
- end
135
-
136
125
  if ldscript
137
126
  retry
138
127
  else
128
+ # TODO better library lookup logic
129
+ libname = libname.to_s
130
+ unless libname.start_with?("/")
131
+ path = ['/usr/lib/','/usr/local/lib/'].find do |pth|
132
+ File.exist?(pth + libname)
133
+ end
134
+ if path
135
+ libname = path + libname
136
+ retry
137
+ end
138
+ end
139
+
139
140
  libr = (orig == libname ? orig : "#{orig} #{libname}")
140
141
  errors[libr] = ex
141
142
  end
@@ -1,4 +1,4 @@
1
1
  module FFI
2
- VERSION = '1.9.12'
2
+ VERSION = '1.9.13'
3
3
  end
4
4
 
@@ -96,6 +96,16 @@ describe "Library" do
96
96
  }.not_to raise_error
97
97
  end
98
98
 
99
+ it "loads library using symbol" do
100
+ expect {
101
+ expect(Module.new do |m|
102
+ m.extend FFI::Library
103
+ ffi_lib :c
104
+ attach_function :getpid, [ ], :uint
105
+ end.getpid).to eq(Process.pid)
106
+ }.not_to raise_error
107
+ end
108
+
99
109
  it "attach_function :getpid from [ 'c', 'libc.so.6'] " do
100
110
  expect {
101
111
  expect(Module.new do |m|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.12
4
+ version: 1.9.13
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Wayne Meissner