test-unit 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +13 -0
- data/lib/test/unit/fixture.rb +6 -0
- data/lib/test/unit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6a6de313462a0618acd2440bc3e639a59d616f6ff67d6d42cd301cdcbbdb2b6
|
4
|
+
data.tar.gz: 59f68dc0e5c451d899f1cdd582c626e634a6b1fc7a45dde46312d33c6dd78104
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c73428a30c84ed9949fe37c29d969c830f4ab8bd534a9b72da145e2347f0c4d621f6dc88385f0e181de66b4206c26cc355b6454174f6d2c34aa3cebc5e602dc
|
7
|
+
data.tar.gz: 30cf3e15384e3a0b32f15bafbbadbd22aa22dbdb74d87449e89fb682da398aee6d46555c2a9b7a30360bdff33524734617d78dc018f97b37725903bae312c338
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.4.1 - 2021-04-19 {#version-3-4-1}
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
* Fixed a bug that `setup`/`cleanup`/`teardown` with block may be
|
8
|
+
overwritten by another `setup`/`cleanup`/`teardown` with
|
9
|
+
block. It's caused only with Ruby 2.6 or earlier.
|
10
|
+
[GitHub#179][Reported by akira yamada]
|
11
|
+
|
12
|
+
### Thanks
|
13
|
+
|
14
|
+
* akira yamada
|
15
|
+
|
3
16
|
## 3.4.0 - 2021-01-30 {#version-3-4-0}
|
4
17
|
|
5
18
|
### Improvements
|
data/lib/test/unit/fixture.rb
CHANGED
@@ -103,6 +103,7 @@ module Test
|
|
103
103
|
@test_case = test_case
|
104
104
|
@type = type
|
105
105
|
@default_options = default_options
|
106
|
+
@callbacks = {}
|
106
107
|
@before_prepend_callbacks = []
|
107
108
|
@before_append_callbacks = []
|
108
109
|
@after_prepend_callbacks = []
|
@@ -130,6 +131,11 @@ module Test
|
|
130
131
|
@test_case.attribute(:source_location,
|
131
132
|
callback.source_location,
|
132
133
|
method_name)
|
134
|
+
# For Ruby 2.6 or earlier. callback may be GC-ed. If
|
135
|
+
# callback is GC-ed, callback_method_name may be
|
136
|
+
# duplicated because callback_method_name uses callback.object_id.
|
137
|
+
# See also: https://github.com/test-unit/test-unit/issues/179
|
138
|
+
@callbacks[callback] = true
|
133
139
|
@test_case.__send__(:define_method, method_name, &callback)
|
134
140
|
else
|
135
141
|
method_name = method_name_or_callback
|
data/lib/test/unit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|