ffi 1.9.12 → 1.9.13

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: f5384dc1ad83cc154814d1caf19bf73add2073e9
4
- data.tar.gz: 2d0411d05b20266f3a0232182e3fdc94e4ffce7f
3
+ metadata.gz: ae37e4a0786d5656ea80701b2a6752adabc12b98
4
+ data.tar.gz: 6b6fcd4779ce7669cfdac62426e794204fe3c4a1
5
5
  SHA512:
6
- metadata.gz: 0cecdb13ca1dc33e06911810ce16b7b6085ff60985e1eab84eb9f4eb6c73fa1185937bcab477e5930ecc4165d0391523f8ca8bcf8a7d3f30eb7254047bb5e52e
7
- data.tar.gz: 9244b575f403ac117fb3a9c869e21bd1f1e0abd0be26f5593799d00cadd9f5fb36c4379b0000872e2e7c03d662f1c76012d0744b153be51f08c9237e6f277f5a
6
+ metadata.gz: 75d63a7a600c78b6ca7c050c72af5ce2dabe5f95ddaf459cf0f49800d85b5501db7180ef66e581f139276c99cf8a7d96a714282a0ae69f0ada37a4cb9c7ea27e
7
+ data.tar.gz: 58d41a1f3a1b6ddd769fa1edccb8e063f94675caeb3e93fa8f3a7b66fb6eba8cc400c142bd30873ed4b88e39a8253d31aba138151d56d6cdb120c67c080b10d0
@@ -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: ruby
6
6
  authors:
7
7
  - Wayne Meissner
@@ -570,7 +570,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
570
570
  version: '0'
571
571
  requirements: []
572
572
  rubyforge_project:
573
- rubygems_version: 2.4.8
573
+ rubygems_version: 2.5.1
574
574
  signing_key:
575
575
  specification_version: 4
576
576
  summary: Ruby FFI