diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-31 13:30:10 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-31 13:30:10 +0000 |
commit | 3c491a92f6fbfecc065f7687c51c7d6d52a38883 (patch) | |
tree | 6a985c1ee634ece6a8772a558a9d817dbfa7ca8f | |
parent | bfdccf09c79262d10e42c8b4eeb8bb2cacada74f (diff) | |
download | ruby-3c491a92f6fbfecc065f7687c51c7d6d52a38883.tar.gz |
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
@timeout_info's "can't add a new key into hash during iteration".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/webrick/utils.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Mar 31 21:39:45 2012 NARUSE, Yui <naruse@ruby-lang.org> + + * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent + @timeout_info's "can't add a new key into hash during iteration". + Sat Mar 31 14:22:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> * hash.c (hash_default_value): extract from rb_hash_aref(), to be diff --git a/lib/webrick/utils.rb b/lib/webrick/utils.rb index 157c530cc9..d9c39360ee 100644 --- a/lib/webrick/utils.rb +++ b/lib/webrick/utils.rb @@ -175,7 +175,7 @@ module WEBrick Thread.start{ while true now = Time.now - @timeout_info.each{|thread, ary| + @timeout_info.dup.each{|thread, ary| ary.dup.each{|info| time, exception = *info interrupt(thread, info.object_id, exception) if time < now |