From 362208c041ee8feed9262d0c7f2c78bf3caea6e5 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 23 Mar 2013 19:50:49 +0000 Subject: [PATCH] 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 --- KNOWNBUGS.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/KNOWNBUGS.rb b/KNOWNBUGS.rb index 989b86e8cb..2e4f058661 100644 --- a/KNOWNBUGS.rb +++ b/KNOWNBUGS.rb @@ -4,10 +4,13 @@ # assert_normal_exit %q{ - loop do - def x - "hello" * 1000 + require 'timeout' + timeout(2) do + loop do + def x + "hello" * 1000 + end + method(:x).call end - method(:x).call end }, '[ruby-core:53640] [Bug #8100]'