From: Yusuke ENDOH Date: 2009-03-04T21:20:12+09:00 Subject: [ruby-dev:38135] [Bug:trunk] SizedQueue can be pushed over its limit 遠藤です。 SizedQueue のリミットの判定が間違っています。 $ ./miniruby -rlib/thread -e 'q = SizedQueue.new(2); q << 1; q << 1; q << 1; p q' #> 次回のパッチリリースに含めるべきだと思います。 Index: lib/thread.rb =================================================================== --- lib/thread.rb (revision 22764) +++ lib/thread.rb (working copy) @@ -292,7 +292,7 @@ t = nil @mutex.synchronize{ while true - break if @que.length <= @max + break if @que.length < @max @queue_wait.push Thread.current @mutex.sleep end -- Yusuke ENDOH