From 1c47bd88c13a19ce0b0a184d6e552f4d26433ac4 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 10 Mar 2013 23:01:21 +0000 Subject: * lib/thread.rb (Queue#push): return self. * lib/thread.rb (Queue#clear): ditto. * lib/thread.rb (SizedQueue#push): ditto. * test/thread/test_queue.rb: add tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/thread.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/thread.rb') diff --git a/lib/thread.rb b/lib/thread.rb index 1c8107085b..0bc95a2594 100644 --- a/lib/thread.rb +++ b/lib/thread.rb @@ -165,6 +165,7 @@ class Queue @que.push obj @cond.signal end + self end end @@ -228,6 +229,7 @@ class Queue # def clear @que.clear + self end # @@ -315,6 +317,7 @@ class SizedQueue < Queue @que.push obj @cond.signal end + self end end -- cgit v1.2.3