ffi-gdbm 1.3.1 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gdbm.rb +10 -1
  3. metadata +9 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fba866c16c1d442d2af541352007d8680de4c62f
4
- data.tar.gz: 5a08a11f7da622796c38c0e361c849d1b3941a14
3
+ metadata.gz: 7d5d838f3df666816775d36f044bbc7229c36ef5
4
+ data.tar.gz: e12fcc20932a42c87d468956ef2ddc398aa7a4fc
5
5
  SHA512:
6
- metadata.gz: c295ceb52a12db3405a436f5ce77f9862a357fd1872f593233d97ad2579eefe9df3d4cc855f0da5957ab76c5c0c45bf0a9fbe52b79ae7df8385b5a8d2df8527c
7
- data.tar.gz: 95d952f4b05fd4860e594116e5df97c227854acb7056343f68ad98601505ecaab52f3017fe2c1090637e6818c80e8f5ab341b43de151fbeb08a41572e6e78101
6
+ metadata.gz: 70ff571ca3515cdf0982143d8e8c3b29455a31da80a79b439189e5fabad0fc9c7432468c146102bc876e5623c8f4902ee2701327cfc5b6450a18bc1493c5fe38
7
+ data.tar.gz: bd7070831bd6f8d9ec0e00795cd332e4f75538c92c2a639f4275e86cb3d5530c9d43539dc85890300744daac409e1d471b8b44bd07f0240b4ebaf3c477ee04ab
@@ -94,7 +94,16 @@ module GDBM_FFI
94
94
 
95
95
  FATAL = Proc.new { |msg| raise RuntimeError, msg }
96
96
 
97
- attach_variable :error_number, :gdbm_errno, :int
97
+ begin
98
+ attach_variable :error_number, :gdbm_errno, :int
99
+ rescue FFI::NotFoundError
100
+ attach_function :gdbm_errno_location, [], :pointer
101
+
102
+ def self.error_number
103
+ self.gdbm_errno_location.read_int
104
+ end
105
+ end
106
+
98
107
  attach_variable :VERSION, :gdbm_version, :string
99
108
 
100
109
  #Store the given Strings in _file_. _file_ is always GDBM_FILE pointer in these functions.
metadata CHANGED
@@ -1,16 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-gdbm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Collins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
11
+ date: 2019-02-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: This library provides a gdbm library compatible with the MRI standard library, but using Ruby-FFI rather than a C extension. This allows gdbm to easily be used from alternative Ruby implementations, such as JRuby. It can also be used with MRI, if there is some kind of need for that.
13
+ description: This library provides a gdbm library compatible with the MRI standard
14
+ library, but using Ruby-FFI rather than a C extension. This allows gdbm to easily
15
+ be used from alternative Ruby implementations, such as JRuby. It can also be used
16
+ with MRI, if there is some kind of need for that.
14
17
  email:
15
18
  executables: []
16
19
  extensions: []
@@ -37,8 +40,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
40
  version: '0'
38
41
  requirements: []
39
42
  rubyforge_project:
40
- rubygems_version: 2.6.8
43
+ rubygems_version: 2.6.14.1
41
44
  signing_key:
42
45
  specification_version: 4
43
- summary: Provides access to gdbm through Ruby-FFI, particularly for JRuby and other alternative Ruby implementations.
46
+ summary: Provides access to gdbm through Ruby-FFI, particularly for JRuby and other
47
+ alternative Ruby implementations.
44
48
  test_files: []