diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-15 10:35:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-15 10:35:13 +0000 |
commit | ffeb75d07bfd82ed47c7f775cd0a7e0bbd6ac78c (patch) | |
tree | 0fc994439ba03a755f93891c7b5c3c0ebbef93f2 /test | |
parent | b02b420c9a6b89f8c92fd30b94afab2bbd380df3 (diff) | |
download | ruby-ffeb75d07bfd82ed47c7f775cd0a7e0bbd6ac78c.tar.gz |
gettimeofday is obsolete
* test/ruby/test_process.rb gettimeofday is obsolete in SUSv4, and
may not be available in the future.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 59f699931b..a9052b4706 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2046,7 +2046,11 @@ EOS def test_clock_gettime_GETTIMEOFDAY_BASED_CLOCK_REALTIME n = :GETTIMEOFDAY_BASED_CLOCK_REALTIME - t = Process.clock_gettime(n) + begin + t = Process.clock_gettime(n) + rescue Errno::EINVAL + return + end assert_kind_of(Float, t, "Process.clock_gettime(:#{n})") end @@ -2124,7 +2128,11 @@ EOS def test_clock_getres_GETTIMEOFDAY_BASED_CLOCK_REALTIME n = :GETTIMEOFDAY_BASED_CLOCK_REALTIME - t = Process.clock_getres(n) + begin + t = Process.clock_getres(n) + rescue Errno::EINVAL + return + end assert_kind_of(Float, t, "Process.clock_getres(:#{n})") assert_equal(1000, Process.clock_getres(n, :nanosecond)) end |