cequel 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/cequel/record.rb +14 -2
- data/lib/cequel/spec_support/preparation.rb +0 -1
- data/lib/cequel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fe85356836d10e62c3efee7ccaaa6ed0f2f38a4
|
4
|
+
data.tar.gz: 77e489f1612b22a165ac4724db174fd901fc7631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ec55765ffbc090cfba486673f3bcc1755b5cd59f360da4dc1e9902bc84bcea33452ddf38c1f5839cf12390d20bcb8c3a46539dbda82d32271ab53fa52ebe54c
|
7
|
+
data.tar.gz: c57c6e55f5b2d20cbdcf4878531b4d8c13d7c69e3a75e4ebc45ded534880a7bc8c296c645ef6d4864e059b98835bbd470144e181af55fa481ca0d29ee7dd5879
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/cequel/record.rb
CHANGED
@@ -122,12 +122,24 @@ module Cequel
|
|
122
122
|
# @return [Array<Class>] All the record classes that are
|
123
123
|
# currently defined.
|
124
124
|
def descendants
|
125
|
-
|
125
|
+
weak_descendants.map do |clazz|
|
126
|
+
begin
|
127
|
+
clazz.__getobj__ if clazz.weakref_alive?
|
128
|
+
rescue WeakRef::RefError
|
129
|
+
nil
|
130
|
+
end
|
131
|
+
end.compact
|
126
132
|
end
|
127
133
|
|
128
134
|
# Hook called when new record classes are created.
|
129
135
|
def included(base)
|
130
|
-
|
136
|
+
weak_descendants << WeakRef.new(base)
|
137
|
+
end
|
138
|
+
|
139
|
+
private
|
140
|
+
|
141
|
+
def weak_descendants
|
142
|
+
@weak_descendants ||= []
|
131
143
|
end
|
132
144
|
end
|
133
145
|
end
|
data/lib/cequel/version.rb
CHANGED