Skip to content

Commit

Permalink
Added explicitly begin-end block for Ruby 2.4.
Browse files Browse the repository at this point in the history
  strscan, ipaddr and some default gems still support Ruby 2.4.

  After this, I extract this CoreAssertions to their repositories.
  • Loading branch information
hsbt committed Sep 10, 2024
1 parent 64e5652 commit b7e418b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tool/lib/core_assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,13 @@ def assert_all_assertions_foreach(msg = nil, *keys, &block)
].find do |c|
if Process.const_defined?(c)
[c.to_sym, Process.const_get(c)].find do |clk|
Process.clock_gettime(clk)
rescue
# Constants may be defined but not implemented, e.g., mingw.
else
PERFORMANCE_CLOCK = clk
begin
Process.clock_gettime(clk)
rescue
# Constants may be defined but not implemented, e.g., mingw.
else
PERFORMANCE_CLOCK = clk
end
end
end
end
Expand Down

0 comments on commit b7e418b

Please sign in to comment.