test-unit 3.6.5 → 3.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89848098de31dc4b7c6164ea0d473f357c957adfb7247eb49187580dab042d6a
4
- data.tar.gz: 7b5d8c3b892a77d069e708d39cd779dae9f7845705386c5fe6c4e58a44d8b6af
3
+ metadata.gz: 238d27a3abf3ab70fa38affa00e2fd5944adde841397d1a5307b68eff94362c2
4
+ data.tar.gz: 6e6ef248d44e47e83bb45d24b160dfdccb32d167123534445d49c7358bcb3bcb
5
5
  SHA512:
6
- metadata.gz: 253a5aed19a3759d6d4ceec439d5e696910187a8bfae52cea34cb000ea64b2728a246703cfdcfc4f09fa744f7014486c1d9d83e32620d2c37b80972c0cceb31c
7
- data.tar.gz: d3bae342534e1bbdc5af82d539c0cb8627f3e701eb60ed58b6199d8c67bc280bfbedad0470e91e7e3d9bf050dc50458a19edf75a7e027f050d2c291677dfcc9a
6
+ metadata.gz: 44cb65959ff5ee6e9673901218b9a29494158a822682d9d12a4b5ba7ce21f965ef87fdf3a697b8d07c91ca7b1fe9f1f0cee7bf6b3da4d74485fd221dcc03fe2c
7
+ data.tar.gz: 327924d71d4ec015870afec579d9936a6e0425dada2c3b6185a10ce9a2f11e9b5666f9b41641fe994e4150a513d4dd659517181ab31158881595502a77cac708
data/doc/text/news.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # News
2
2
 
3
+ ## 3.6.7 - 2024-12-17 {#version-3-6-7}
4
+
5
+ ### Fixes
6
+
7
+ * Fixed a bug that test-unit doesn't work with Ruby < 2.5.
8
+
9
+ ## 3.6.6 - 2024-12-17 {#version-3-6-6}
10
+
11
+ ### Improvements
12
+
13
+ * Improved backward compatibility for the `Test::Unit::TestCase#run`
14
+ overriding case. In general, we don't recommend it but there are
15
+ old scripts that do it. (Mainly, I did it...)
16
+ * GH-276
17
+ * Reported by Mamoru TASAKA
18
+
19
+ ### Thanks
20
+
21
+ * Mamoru TASAKA
22
+
3
23
  ## 3.6.5 - 2024-12-15 {#version-3-6-5}
4
24
 
5
25
  ### Fixes
@@ -65,7 +65,7 @@ module Test
65
65
  finished_is_yielded = false
66
66
  finished_object_is_yielded = false
67
67
  previous_event_name = nil
68
- test.run(result, runner_class: self.class) do |event_name, *args|
68
+ event_listener = lambda do |event_name, *args|
69
69
  case previous_event_name
70
70
  when Test::Unit::TestCase::STARTED
71
71
  if event_name != Test::Unit::TestCase::STARTED_OBJECT
@@ -90,6 +90,14 @@ module Test
90
90
  yield(event_name, *args)
91
91
  end
92
92
 
93
+ if test.method(:run).arity == -2
94
+ test.run(result, runner_class: self.class, &event_listener)
95
+ else
96
+ # For backward compatibility. There are scripts that overrides
97
+ # Test::Unit::TestCase#run without keyword arguments.
98
+ test.run(result, &event_listener)
99
+ end
100
+
93
101
  if finished_is_yielded and not finished_object_is_yielded
94
102
  yield(Test::Unit::TestCase::FINISHED_OBJECT, test)
95
103
  end
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.6.5"
3
+ VERSION = "3.6.7"
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.6.5
4
+ version: 3.6.7
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: 2024-12-15 00:00:00.000000000 Z
12
+ date: 2024-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert