timers 4.3.4 → 4.3.5
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/timers/priority_heap.rb +6 -6
- data/lib/timers/version.rb +1 -1
- 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: e7c61c9db77955d85c69ca83499add3629c71628af3a825d78978b2383182b4a
|
4
|
+
data.tar.gz: 27f570753d83d4b4a98ee6ede089908d571347df8ba411edb56fe4ae965e703c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7bac196cc0e3e1a784f7ba961c4a09539c875f80ac366da0b0d091d9f6ad1a505fb0a86a0c9d61d44a3495342029d003749b3ac072904b37f667d8e6e90b356
|
7
|
+
data.tar.gz: 4fa05113f72aef3abe63804a097e7fd9322c5b84a2a9ad14d590906e3ca59754857378a085388c52f9eb7ef1beb934b6b75789c3c087eee0b900f3446ace7207
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/timers/priority_heap.rb
CHANGED
@@ -70,16 +70,16 @@ module Timers
|
|
70
70
|
return self
|
71
71
|
end
|
72
72
|
|
73
|
-
|
73
|
+
# Empties out the heap, discarding all elements
|
74
74
|
def clear!
|
75
|
-
|
76
|
-
|
75
|
+
@contents = []
|
76
|
+
end
|
77
77
|
|
78
78
|
# Validate the heap invariant. Every element except the root must not be smaller than
|
79
|
-
|
79
|
+
# its parent element. Note that it MAY be equal.
|
80
80
|
def valid?
|
81
|
-
|
82
|
-
|
81
|
+
# notice we skip index 0 on purpose, because it has no parent
|
82
|
+
(1..(@contents.size - 1)).all? { |e| @contents[e] >= @contents[(e - 1) / 2] }
|
83
83
|
end
|
84
84
|
|
85
85
|
private
|
data/lib/timers/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -67,7 +67,7 @@ cert_chain:
|
|
67
67
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
68
68
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
69
69
|
-----END CERTIFICATE-----
|
70
|
-
date: 2022-
|
70
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
71
71
|
dependencies:
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|