test-unit-ruby-core 1.0.6 → 1.0.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 +4 -4
- data/lib/core_assertions.rb +9 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fbe8678b64c96aecfb825b2a2544e7089a681be164521d259880d07e5cf0589
|
4
|
+
data.tar.gz: 2726f59cb0cf549b49a1250d11324fe26f2eb93eb685740086bed65491b3f00f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3880a3106697e03f423822c456d1753755078378106d0e4bbfc7a2bbe7305a4860897aae9716dd77ab33a7b9503ef484beaa9a06bcdabd4bfa72f3036a191582
|
7
|
+
data.tar.gz: 9626368354be4eecb5c13a0d0fac687cd2c0ad8179315e899f1d27d564cd95b958ef07eea561d98102d362c56b49a08fac761c1e1dce7045afd7f84006aeddd3
|
data/lib/core_assertions.rb
CHANGED
@@ -371,6 +371,10 @@ eom
|
|
371
371
|
def assert_ractor(src, args: [], require: nil, require_relative: nil, file: nil, line: nil, ignore_stderr: nil, **opt)
|
372
372
|
return unless defined?(Ractor)
|
373
373
|
|
374
|
+
# https://bugs.ruby-lang.org/issues/21262
|
375
|
+
shim_value = "class Ractor; alias value take; end" unless Ractor.method_defined?(:value)
|
376
|
+
shim_join = "class Ractor; alias join take; end" unless Ractor.method_defined?(:join)
|
377
|
+
|
374
378
|
require = "require #{require.inspect}" if require
|
375
379
|
if require_relative
|
376
380
|
dir = File.dirname(caller_locations[0,1][0].absolute_path)
|
@@ -379,6 +383,8 @@ eom
|
|
379
383
|
end
|
380
384
|
|
381
385
|
assert_separately(args, file, line, <<~RUBY, ignore_stderr: ignore_stderr, **opt)
|
386
|
+
#{shim_value}
|
387
|
+
#{shim_join}
|
382
388
|
#{require}
|
383
389
|
previous_verbose = $VERBOSE
|
384
390
|
$VERBOSE = nil
|
@@ -825,7 +831,9 @@ eom
|
|
825
831
|
end
|
826
832
|
times.compact!
|
827
833
|
tmin, tmax = times.minmax
|
828
|
-
|
834
|
+
|
835
|
+
# safe_factor * tmax * rehearsal_time_variance_factor(equals to 1 when variance is small)
|
836
|
+
tbase = 10 * tmax * [(tmax / tmin) ** 2 / 4, 1].max
|
829
837
|
info = "(tmin: #{tmin}, tmax: #{tmax}, tbase: #{tbase})"
|
830
838
|
|
831
839
|
seq.each do |i|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit-ruby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi SHIBATA
|
8
8
|
- Nobu Nakada
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
|
-
rubygems_version: 3.
|
59
|
+
rubygems_version: 3.7.0.dev
|
60
60
|
specification_version: 4
|
61
61
|
summary: Additional test assertions for Ruby standard libraries.
|
62
62
|
test_files: []
|