1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add timeout to infinite loop [Bug #8100]

On FreeBSD, it doesn't SEGV.
http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130323T170203Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-03-23 19:50:49 +00:00
parent 20219afd83
commit 362208c041

View file

@ -4,10 +4,13 @@
# #
assert_normal_exit %q{ assert_normal_exit %q{
loop do require 'timeout'
def x timeout(2) do
"hello" * 1000 loop do
def x
"hello" * 1000
end
method(:x).call
end end
method(:x).call
end end
}, '[ruby-core:53640] [Bug #8100]' }, '[ruby-core:53640] [Bug #8100]'