diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-10-20 14:34:08 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-09-10 16:00:29 +0900 |
| commit | af17a34c883bbfc5cefcde91f37edbe2222fda97 (patch) | |
| tree | 38353a3fbc8183c4d82a71600535d625eeb69f15 | |
| parent | ebd44ef57043eddabf8cd06e5348d3d4625063f0 (diff) | |
Added explicitly begin-end block for Ruby 2.4.
strscan, ipaddr and some default gems still support Ruby 2.4.
After this, I extract this CoreAssertions to their repositories.
| -rw-r--r-- | tool/lib/core_assertions.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index fe625fc965..1dcf72ca32 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -732,11 +732,13 @@ eom ].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 |
