ffi 0.5.3-java → 0.5.4-java

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.

Files changed (3) hide show
  1. data/Rakefile +3 -3
  2. data/lib/ffi.rb +10 -15
  3. metadata +5 -5
data/Rakefile CHANGED
@@ -9,9 +9,9 @@ task :default => 'gem:repackage'
9
9
 
10
10
  PROJ.name = 'ffi'
11
11
  PROJ.authors = "JRuby Project"
12
- PROJ.email = "dev@ruby-ffi.kenai.com"
13
- PROJ.url = "http://kenai.com/projects/ruby-ffi"
14
- PROJ.version = "0.5.3"
12
+ PROJ.email = "ruby-ffi@groups.google.com"
13
+ PROJ.url = "http://wiki.github.com/ffi/ffi"
14
+ PROJ.version = "0.5.4"
15
15
  PROJ.rubyforge.name = 'ffi'
16
16
  PROJ.svn.path = 'ffi'
17
17
  PROJ.summary = "A Ruby foreign function interface"
data/lib/ffi.rb CHANGED
@@ -19,29 +19,24 @@ module FFI
19
19
 
20
20
  end
21
21
 
22
- if JRUBY_VERSION < "1.6.0"
22
+ # Fix for RUBY-3527
23
+ if JRUBY_VERSION >= "1.2.0" && JRUBY_VERSION < "1.3.0"
23
24
  module Library
24
25
  def ffi_lib(*names)
25
-
26
- ffi_libs = names.map do |name|
27
- libnames = (name.is_a?(::Array) ? name : [ name ]).map { |n| [ n, FFI.map_library_name(n) ].uniq }.flatten
28
- lib = nil
29
- errors = {}
30
-
31
- libnames.each do |libname|
26
+ ffi_libs = []
27
+ names.each do |name|
28
+ [ name, FFI.map_library_name(name) ].each do |libname|
32
29
  begin
33
30
  lib = FFI::DynamicLibrary.open(libname, FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_GLOBAL)
34
- break if lib
31
+ if lib
32
+ ffi_libs << lib
33
+ break
34
+ end
35
35
  rescue LoadError => ex
36
- errors[libname] = ex
37
36
  end
38
37
  end
39
-
40
- if lib.nil?
41
- raise LoadError.new(errors.values.join('. '))
42
- end
43
38
  end
44
-
39
+ raise LoadError, "Could not open any of [#{names.join(", ")}]" if ffi_libs.empty?
45
40
  @ffi_libs = ffi_libs
46
41
  end
47
42
  end
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: 0.5.3
4
+ version: 0.5.4
5
5
  platform: java
6
6
  authors:
7
7
  - JRuby Project
@@ -9,12 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-20 00:00:00 +10:00
12
+ date: 2009-11-28 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: ""
17
- email: dev@ruby-ffi.kenai.com
17
+ email: ruby-ffi@groups.google.com
18
18
  executables: []
19
19
 
20
20
  extensions: []
@@ -41,7 +41,7 @@ files:
41
41
  - tasks/test.rake
42
42
  - tasks/zentest.rake
43
43
  has_rdoc: true
44
- homepage: http://kenai.com/projects/ruby-ffi
44
+ homepage: http://wiki.github.com/ffi/ffi
45
45
  licenses: []
46
46
 
47
47
  post_install_message:
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  requirements: []
66
66
 
67
67
  rubyforge_project: ffi
68
- rubygems_version: 1.3.4
68
+ rubygems_version: 1.3.5
69
69
  signing_key:
70
70
  specification_version: 3
71
71
  summary: A Ruby foreign function interface