rex-core 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rex/core/version.rb +1 -1
- data/lib/rex/sync/ref.rb +27 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8ac9ac5c78f2af305446d6b5deeb2fdec947b00912eddd5c67d078c90c81ac4
|
4
|
+
data.tar.gz: a01aa99645e7230085e2889cc2527d870db46666542771b3b0d5c91c92f93d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d4976c2e3bc4066992ba28261c7e4ea6bb7751b083700c4f6ac50238fcb5703e972ce7dc2071b41916f50da9e96d6b0e1b7bb4c4bcdcf22a98dde7f98931402
|
7
|
+
data.tar.gz: d718c23b2fa94b3d525f94f205a50b132084f1f237cf2ce10dd81cc50fd51bbf44bdcee28d3008ee424d283db8d79c642beb7f6b8003e3c2ed2ebf33e1c47181
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rex/core/version.rb
CHANGED
data/lib/rex/sync/ref.rb
CHANGED
@@ -10,11 +10,38 @@ module Rex
|
|
10
10
|
#
|
11
11
|
###
|
12
12
|
module Ref
|
13
|
+
#
|
14
|
+
# Raises a TypeError to prevent cloning.
|
15
|
+
#
|
16
|
+
def clone
|
17
|
+
raise TypeError, "can't clone instance of Ref #{self.class}"
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# Raises a TypeError to prevent duping.
|
22
|
+
#
|
23
|
+
def dup
|
24
|
+
raise TypeError, "can't dup instance of Ref #{self.class}"
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Ensures that the Ref is correctly initialized when extended on an object:
|
29
|
+
# ```
|
30
|
+
# arbitrary_resource = Resource.new
|
31
|
+
# arbitrary_resource.extend(::Rex::Ref)
|
32
|
+
# ```
|
33
|
+
#
|
34
|
+
# @param instance [object] the instance that has just extended the Ref module
|
35
|
+
def self.extended(instance)
|
36
|
+
instance.refinit
|
37
|
+
end
|
13
38
|
|
14
39
|
#
|
15
40
|
# Initializes the reference count to one.
|
16
41
|
#
|
17
42
|
def refinit
|
43
|
+
return if defined?(@_references)
|
44
|
+
|
18
45
|
@_references = 1
|
19
46
|
@_references_mutex = Mutex.new
|
20
47
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -93,7 +93,7 @@ cert_chain:
|
|
93
93
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
94
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
95
|
-----END CERTIFICATE-----
|
96
|
-
date: 2022-
|
96
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
Binary file
|