rb-libmagic 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e55bd56d21d9f6f4015659285a34458305fc1e298bfb72a5839383a46d0ec21
4
- data.tar.gz: 19b4d7f13e67d087ff3c12378c6d99f4b9f42fa7c8b97678cdaab974fc2abbb6
3
+ metadata.gz: 78e87c767be18db96a2f6afb853aecb6ec535dedeb681b51e8b680f6c8cc7edb
4
+ data.tar.gz: 002eaf9dc49ed4cc7bbc04db6e29fffa765439bc9849f6c54ecc2230349279e4
5
5
  SHA512:
6
- metadata.gz: ce812497ba741dee04e3d51170d04c34ca21b9ccad29f77e75f3e453ff3135be2a30dd6fcb3b8891e58960b3f228e6b66d762c4ac536a409ea8000ba4a49a39e
7
- data.tar.gz: d2531e65292a28911f8dce7a1276e2dfa71923fbc6b41bd56909f6c271287e2bc760ac2ce09f11223f905222719031ae003f636c6fc0385ef9d95bb80b431bac
6
+ metadata.gz: fffe2e71a949deb402c7bb1551a3ef6f6479b85740044e12e56d95c8e0eca562c96acbc7b314f48aa3137425b33f85e5ab6397c675eeb0847119269889966106
7
+ data.tar.gz: a1a50fccb52b5b3d03e9656f8cd0bf8084f14c99634fa61eb4e2d1a5bcfdf7288351109590ff815630271ad94d081dee61a0a72d035309717d6fd0bb2f245309
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/lib/magic/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Magic
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/magic.rb CHANGED
@@ -67,7 +67,7 @@ class Magic
67
67
  end
68
68
 
69
69
  begin
70
- ObjectSpace.define_finalizer(self){ close }
70
+ ObjectSpace.define_finalizer(self, self.class.finalize(@cookie)) if @cookie
71
71
  rescue
72
72
  end
73
73
  end
@@ -106,8 +106,9 @@ class Magic
106
106
  @path = path
107
107
  end
108
108
 
109
- def close
110
- magic_close(@cookie) if @cookie
111
- @cookie = nil
109
+ def self.finalize(cookie)
110
+ proc {
111
+ magic_close(cookie)
112
+ }
112
113
  end
113
114
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-libmagic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael 'manveru' Fellinger
8
8
  - Liam P. White
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2019-04-20 00:00:00.000000000 Z
@@ -25,12 +25,13 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1'
28
- description:
28
+ description:
29
29
  email: liamwhite@users.noreply.github.com
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - ".gitignore"
34
35
  - LICENSE
35
36
  - README.md
36
37
  - lib/magic.rb
@@ -40,7 +41,7 @@ homepage: http://github.com/liamwhite/rb-libmagic
40
41
  licenses:
41
42
  - MIT
42
43
  metadata: {}
43
- post_install_message:
44
+ post_install_message:
44
45
  rdoc_options: []
45
46
  require_paths:
46
47
  - lib
@@ -55,9 +56,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
56
  - !ruby/object:Gem::Version
56
57
  version: '0'
57
58
  requirements: []
58
- rubyforge_project:
59
- rubygems_version: 2.7.6.2
60
- signing_key:
59
+ rubygems_version: 3.4.10
60
+ signing_key:
61
61
  specification_version: 4
62
62
  summary: FFI binding for libmagic.
63
63
  test_files: []