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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60687da3bfd86cc13bce040060f2401cc62f890607d7270016fe424a226da99d
4
- data.tar.gz: 0c53df13c6f6d6c0896c7e59928ef773b80fa0f60c5a24ab7e9096779cb41ee7
3
+ metadata.gz: d6a6de313462a0618acd2440bc3e639a59d616f6ff67d6d42cd301cdcbbdb2b6
4
+ data.tar.gz: 59f68dc0e5c451d899f1cdd582c626e634a6b1fc7a45dde46312d33c6dd78104
5
5
  SHA512:
6
- metadata.gz: 1398026ad88d187d8b4a6c706df1ba4e8eb5a315c6dbaa61a38785a0a3a2126fb6eddf2c5e0072020482b705cb3b3ebde02cc43624a5f43669cb49e2b38a501a
7
- data.tar.gz: 00a8084948431ae2eb1db14726ebad5a2c82ac5740469ebcb4aedf73854df1a2a0ddf7754b525536a2eeedf8cb7095087db9d17abf503537becc519a88187322
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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.4.0"
3
+ VERSION = "3.4.1"
4
4
  end
5
5
  end
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.0
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-01-29 00:00:00.000000000 Z
12
+ date: 2021-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert