1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
normal ecd2c08a4c thread.c (thread_join_m): handle negative timeouts correctly
Users may subtract and round into negative values when using
Thread#join, so clamp the timeout to zero to avoid infinite/long
timeouts.

Note: other methods such as Kernel#sleep and IO.select will
raise on negative values, but Thread#join is an outlier *shrug*

This restores Ruby 2.5 (and earlier) behavior.

Fixes: r62182 (commit c915390b95)
       ("thread.c: avoid FP for Thread#join")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 03:00:33 +00:00
..
-ext- mjit_compile.c: merge initial JIT compiler 2018-02-04 11:22:28 +00:00
base64
benchmark
bigdecimal $SAFE as a process global state. [Feature #14250] 2017-12-28 20:09:24 +00:00
cgi
coverage test/coverage/test_coverage.rb: make the expected value the same as 2.4 2017-12-20 04:45:05 +00:00
csv
date Add FrozenError as a subclass of RuntimeError 2017-12-12 00:46:34 +00:00
dbm skip some tests so that no failure occurs in root privilege 2018-01-10 10:39:09 +00:00
digest Fix tests which fail with extra stderr output when a Thread dies 2017-12-12 18:44:21 +00:00
drb drb: use \A and \z 2017-12-30 12:10:43 +00:00
dtrace
erb erb.rb: preserve the behavior for invalid syntax 2017-12-27 12:40:03 +00:00
etc
excludes
fiddle long long is a C99ism 2018-02-17 09:51:23 +00:00
fileutils Fix test-all tests to avoid creating report_on_exception warnings 2017-12-12 18:44:49 +00:00
gdbm Fix indent and use as skipped message instead of comment 2018-01-11 13:56:04 +00:00
io test/io/console/test_io_console.rb (test_oflush): Avoid race condition 2018-02-15 05:34:20 +00:00
irb skip some tests so that no failure occurs in root privilege 2018-01-10 10:39:09 +00:00
json
lib mjit_compile.c: merge initial JIT compiler 2018-02-04 11:22:28 +00:00
logger revert r60999 2017-12-04 00:23:31 +00:00
matrix
minitest
misc
mkmf a C source code must end with EOL 2018-02-17 10:04:22 +00:00
monitor
net net/pop: make modified strings mutable 2018-01-30 00:22:22 +00:00
nkf
objspace
open-uri open-uri defines URI.open defined as an alias. 2017-12-21 14:15:04 +00:00
openssl openssl: suppress report_on_exception warning 2017-12-15 08:19:32 +00:00
optparse optparse.rb: froze string literals 2018-01-26 03:41:04 +00:00
ostruct lib/ostruct.rb: Use FrozenError instead of RuntimeError. 2018-02-06 23:52:30 +00:00
pathname skip some tests so that no failure occurs in root privilege 2018-01-10 10:39:09 +00:00
psych Merge psych-3.0.2 from ruby/psych. 2017-12-19 09:44:33 +00:00
rdoc skip some tests so that no failure occurs in root privilege 2018-01-10 10:39:09 +00:00
readline $SAFE as a process global state. [Feature #14250] 2017-12-28 20:09:24 +00:00
resolv fix for IPv6 env 2018-01-11 19:41:49 +00:00
rexml
rinda Fix test-all tests to avoid creating report_on_exception warnings 2017-12-12 18:44:49 +00:00
ripper
rss
ruby thread.c (thread_join_m): handle negative timeouts correctly 2018-02-18 03:00:33 +00:00
rubygems Remove unnecessary []s 2018-02-17 14:03:52 +00:00
scanf
sdbm skip some tests so that no failure occurs in root privilege 2018-01-10 10:39:09 +00:00
shell
socket init.c: encode socket error message 2018-01-23 15:31:22 +00:00
stringio Add FrozenError as a subclass of RuntimeError 2017-12-12 00:46:34 +00:00
strscan
syslog
testunit
thread mjit_compile.c: merge initial JIT compiler 2018-02-04 11:22:28 +00:00
uri Allow empty path components in a URI [Bug #8352] 2017-12-14 01:11:28 +00:00
webrick mjit_compile.c: merge initial JIT compiler 2018-02-04 11:22:28 +00:00
win32ole $SAFE as a process global state. [Feature #14250] 2017-12-28 20:09:24 +00:00
yaml
zlib
colors
runner.rb
test_abbrev.rb
test_cmath.rb
test_delegate.rb Add FrozenError as a subclass of RuntimeError 2017-12-12 00:46:34 +00:00
test_extlibs.rb
test_find.rb Fix indent and use as skipped message instead of comment 2018-01-11 13:56:04 +00:00
test_forwardable.rb Add test for Forwardable#def_delegator with r55366. 2018-02-01 09:07:16 +00:00
test_ipaddr.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb
test_set.rb Add FrozenError as a subclass of RuntimeError 2017-12-12 00:46:34 +00:00
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb $SAFE as a process global state. [Feature #14250] 2017-12-28 20:09:24 +00:00
test_time.rb
test_timeout.rb
test_tmpdir.rb $SAFE as a process global state. [Feature #14250] 2017-12-28 20:09:24 +00:00
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb