test-unit-ruby-core 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/core_assertions.rb +7 -5
  3. data/lib/envutil.rb +14 -15
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f554b151ece8fd19038fc65a8ed133249214146782d42649de51d3b351ac4de
4
- data.tar.gz: 17fedec74b0949584a4d95f1e96f1f09b5f72d6dba4c145a9042b9d452877876
3
+ metadata.gz: a463533f4ec5ea2d3b3d50aef4663ab7a746a548a020b284eba58214506a6ca3
4
+ data.tar.gz: 900681b4f67b6cd195ad1ff8b54028007ce3b18c1a28634a06b6867164be3cc7
5
5
  SHA512:
6
- metadata.gz: cf31c18554a01de7eac133c3f7938e24f71e06f24afc4ef37a2490a89747c8cca7d8e2995c9c498b85c5d195655778017ffa2ce642fd7920e01bdd3841d16c7c
7
- data.tar.gz: 016c5320e8c780976956643c26a147b1c98f71e5553807b6704f054dc324c5262522978ee22e31df78f9dddae2027e329376aff24ad39269cda4d684d2c5902b
6
+ metadata.gz: 9bf3582d08879211053c48a11f604525585db0c6ad623820ed1e2ec113b52c856587cee0cc6c13b57e06ca771216182fec4fd58b8b4ab4308dad266e26904896
7
+ data.tar.gz: 5dbbdd66fced6282e39f84cdd79f44fefa824351106f6a652b9db79be2d790a09c68493f847dc26d3f54ef0ad4fcd4a6cc7874fe98e92a6c471c978ae2f9c173
@@ -781,11 +781,13 @@ eom
781
781
  ].find do |c|
782
782
  if Process.const_defined?(c)
783
783
  [c.to_sym, Process.const_get(c)].find do |clk|
784
- Process.clock_gettime(clk)
785
- rescue
786
- # Constants may be defined but not implemented, e.g., mingw.
787
- else
788
- PERFORMANCE_CLOCK = clk
784
+ begin
785
+ Process.clock_gettime(clk)
786
+ rescue
787
+ # Constants may be defined but not implemented, e.g., mingw.
788
+ else
789
+ PERFORMANCE_CLOCK = clk
790
+ end
789
791
  end
790
792
  end
791
793
  end
data/lib/envutil.rb CHANGED
@@ -15,23 +15,22 @@ end
15
15
  module EnvUtil
16
16
  def rubybin
17
17
  if ruby = ENV["RUBY"]
18
- return ruby
19
- end
20
- ruby = "ruby"
21
- exeext = RbConfig::CONFIG["EXEEXT"]
22
- rubyexe = (ruby + exeext if exeext and !exeext.empty?)
23
- 3.times do
24
- if File.exist? ruby and File.executable? ruby and !File.directory? ruby
25
- return File.expand_path(ruby)
26
- end
27
- if rubyexe and File.exist? rubyexe and File.executable? rubyexe
28
- return File.expand_path(rubyexe)
29
- end
30
- ruby = File.join("..", ruby)
31
- end
32
- if defined?(RbConfig.ruby)
18
+ ruby
19
+ elsif defined?(RbConfig.ruby)
33
20
  RbConfig.ruby
34
21
  else
22
+ ruby = "ruby"
23
+ exeext = RbConfig::CONFIG["EXEEXT"]
24
+ rubyexe = (ruby + exeext if exeext and !exeext.empty?)
25
+ 3.times do
26
+ if File.exist? ruby and File.executable? ruby and !File.directory? ruby
27
+ return File.expand_path(ruby)
28
+ end
29
+ if rubyexe and File.exist? rubyexe and File.executable? rubyexe
30
+ return File.expand_path(rubyexe)
31
+ end
32
+ ruby = File.join("..", ruby)
33
+ end
35
34
  "ruby"
36
35
  end
37
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi SHIBATA
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-12 00:00:00.000000000 Z
12
+ date: 2023-10-20 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Additional test assertions for Ruby standard libraries.
15
15
  email:
@@ -37,7 +37,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.5'
40
+ version: '2.4'
41
41
  required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - ">="