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.
This commit is contained in:
Hiroshi SHIBATA 2023-10-20 14:34:08 +09:00
parent ebd44ef570
commit af17a34c88

View file

@ -732,6 +732,7 @@ eom
].find do |c| ].find do |c|
if Process.const_defined?(c) if Process.const_defined?(c)
[c.to_sym, Process.const_get(c)].find do |clk| [c.to_sym, Process.const_get(c)].find do |clk|
begin
Process.clock_gettime(clk) Process.clock_gettime(clk)
rescue rescue
# Constants may be defined but not implemented, e.g., mingw. # Constants may be defined but not implemented, e.g., mingw.
@ -740,6 +741,7 @@ eom
end end
end end
end end
end
# Expect +seq+ to respond to +first+ and +each+ methods, e.g., # Expect +seq+ to respond to +first+ and +each+ methods, e.g.,
# Array, Range, Enumerator::ArithmeticSequence and other # Array, Range, Enumerator::ArithmeticSequence and other