зеркало из https://github.com/github/ruby.git
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:
Родитель
9ea1ee66c9
Коммит
bb849ffdb1
|
@ -781,11 +781,13 @@ 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|
|
||||||
Process.clock_gettime(clk)
|
begin
|
||||||
rescue
|
Process.clock_gettime(clk)
|
||||||
# Constants may be defined but not implemented, e.g., mingw.
|
rescue
|
||||||
else
|
# Constants may be defined but not implemented, e.g., mingw.
|
||||||
PERFORMANCE_CLOCK = clk
|
else
|
||||||
|
PERFORMANCE_CLOCK = clk
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче