linked-list 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/linked-list/list.rb +1 -1
- data/lib/linked-list/version.rb +1 -1
- data/test/list_test.rb +10 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dff645cd01380ea68e75dd61a217a9c217a76eb229dc87817caab297444619d7
|
4
|
+
data.tar.gz: cbb85a2893c007c17729a3335b9ea9dd65ae9fd6b7f7a83ce4289fa024b21499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8085a108cc3ac4a8edeea3585a0fd0c8adf1639e450d9d6f33e42b8002c3c1d0bd6a4fd6f88ff8b957075b36ff97bf236ed705446f6536ce029ba59c4f16d867
|
7
|
+
data.tar.gz: 44feefe384c7420d01bba47b31c9ebc825097d672250b0c0a5a5f1615e2c031678b086631bfab05180da05a560757146657fcfeac30f360163f6b08cd4c43f49
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# 0.0.x / Unreleased
|
2
2
|
|
3
|
+
# 0.0.16 / 2021-09-21
|
4
|
+
|
5
|
+
## Fixed
|
6
|
+
|
7
|
+
- Fixed bug when reference to prev node was not set correctly аfter using `shift`.
|
8
|
+
|
9
|
+
[Compare v0.0.15...v0.0.16](https://github.com/spectator/linked-list/compare/v0.0.15...v0.0.16)
|
3
10
|
|
4
11
|
# 0.0.15 / 2020-05-26
|
5
12
|
|
data/lib/linked-list/list.rb
CHANGED
data/lib/linked-list/version.rb
CHANGED
data/test/list_test.rb
CHANGED
@@ -638,6 +638,16 @@ describe LinkedList::List do
|
|
638
638
|
assert_nil list.first
|
639
639
|
end
|
640
640
|
|
641
|
+
it 'sets reference to the prev node' do
|
642
|
+
list.push(node_1)
|
643
|
+
list.push(node_2)
|
644
|
+
assert_nil node_1.prev
|
645
|
+
assert_equal node_2.prev, node_1
|
646
|
+
|
647
|
+
list.shift
|
648
|
+
assert_nil node_2.prev
|
649
|
+
end
|
650
|
+
|
641
651
|
it 'reduces list length by 1' do
|
642
652
|
list.push(node_1)
|
643
653
|
list.shift
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linked-list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Velikanau
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -130,7 +130,7 @@ homepage: https://github.com/spectator/linked-list
|
|
130
130
|
licenses:
|
131
131
|
- MIT
|
132
132
|
metadata: {}
|
133
|
-
post_install_message:
|
133
|
+
post_install_message:
|
134
134
|
rdoc_options: []
|
135
135
|
require_paths:
|
136
136
|
- lib
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubygems_version: 3.1.2
|
149
|
-
signing_key:
|
149
|
+
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Ruby implementation of Doubly Linked List, following some Ruby idioms.
|
152
152
|
test_files:
|