test-unit 3.6.6 → 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: fb180f2c9377ae51f23460d2189f4c20217bfeca25a8ae1fff695f739be548bb
4
- data.tar.gz: 9057f25cf319ffd6ef9185a9f0a80f83975bf3f8a1738bc636e3dd829f9ba4d3
3
+ metadata.gz: 238d27a3abf3ab70fa38affa00e2fd5944adde841397d1a5307b68eff94362c2
4
+ data.tar.gz: 6e6ef248d44e47e83bb45d24b160dfdccb32d167123534445d49c7358bcb3bcb
5
5
  SHA512:
6
- metadata.gz: 3a2dc1551d424ea48056738d7342627c94b1b868a69c01153bed8d3c57cf0f78674a86812e39e00fead22f1035e6ccf383cadb4e91eabe7fb849b8f919bcd1b3
7
- data.tar.gz: 221694d5d44ee5bc4f4ab4faaf8739ee0d3e677e2b337ae98d1fe8443c92c5e0d0dc478a1974ffdbdbffed7217c25b51efae6caaa28fc6e107112732239a96fa
6
+ metadata.gz: 44cb65959ff5ee6e9673901218b9a29494158a822682d9d12a4b5ba7ce21f965ef87fdf3a697b8d07c91ca7b1fe9f1f0cee7bf6b3da4d74485fd221dcc03fe2c
7
+ data.tar.gz: 327924d71d4ec015870afec579d9936a6e0425dada2c3b6185a10ce9a2f11e9b5666f9b41641fe994e4150a513d4dd659517181ab31158881595502a77cac708
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 3.6.6 - 2024-12-17 {#version-3-6-6}
4
10
 
5
11
  ### Improvements
@@ -65,11 +65,7 @@ module Test
65
65
  finished_is_yielded = false
66
66
  finished_object_is_yielded = false
67
67
  previous_event_name = nil
68
- options = {}
69
- # For backward compatibility. There are scripts that overrides
70
- # Test::Unit::TestCase#run without keyword arguments.
71
- options[:runner_class] = self.class if test.method(:run).arity == -2
72
- test.run(result, **options) do |event_name, *args|
68
+ event_listener = lambda do |event_name, *args|
73
69
  case previous_event_name
74
70
  when Test::Unit::TestCase::STARTED
75
71
  if event_name != Test::Unit::TestCase::STARTED_OBJECT
@@ -94,6 +90,14 @@ module Test
94
90
  yield(event_name, *args)
95
91
  end
96
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
+
97
101
  if finished_is_yielded and not finished_object_is_yielded
98
102
  yield(Test::Unit::TestCase::FINISHED_OBJECT, test)
99
103
  end
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.6.6"
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.6
4
+ version: 3.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou