test-unit-ruby-core 1.0.2 → 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 +10 -8
  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: c0bc98ff517fd9116a3a66b9090011c91cae6b3195c2705ca2762ba1c02bc5ea
4
- data.tar.gz: 0cf8f343ef9c6de619a79dc3f087fe559ee3420e59e446f30f060e596072bf25
3
+ metadata.gz: a463533f4ec5ea2d3b3d50aef4663ab7a746a548a020b284eba58214506a6ca3
4
+ data.tar.gz: 900681b4f67b6cd195ad1ff8b54028007ce3b18c1a28634a06b6867164be3cc7
5
5
  SHA512:
6
- metadata.gz: 2edce635953122b9ba15206f2e70c8047903e2bcff2ba1b3f5049cc366811fba69b30ce0a23237c0197179d888342f2491807742d753a944f700d5805e6f2f61
7
- data.tar.gz: 5e15090f910387887b76e5d24eef793bce809238f1ec916a780dde14cb25555dc34f073030a0ef581a6a5067ff4b0b624c53e4de2f8421510713e7e2d141e40d
6
+ metadata.gz: 9bf3582d08879211053c48a11f604525585db0c6ad623820ed1e2ec113b52c856587cee0cc6c13b57e06ca771216182fec4fd58b8b4ab4308dad266e26904896
7
+ data.tar.gz: 5dbbdd66fced6282e39f84cdd79f44fefa824351106f6a652b9db79be2d790a09c68493f847dc26d3f54ef0ad4fcd4a6cc7874fe98e92a6c471c978ae2f9c173
@@ -778,14 +778,16 @@ eom
778
778
  %w[
779
779
  CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
780
780
  CLOCK_MONOTONIC
781
- ].find do |clk|
782
- if Process.const_defined?(clk)
783
- [clk.to_sym, Process.const_get(clk)].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
781
+ ].find do |c|
782
+ if Process.const_defined?(c)
783
+ [c.to_sym, Process.const_get(c)].find do |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.2
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-08-29 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
  - - ">="