diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-13 09:40:29 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-13 09:40:29 +0000 |
commit | 1b7f82e62577986a6122ef453323ace74980d91e (patch) | |
tree | 3518499de338e8c28ec5daaa1396b381e9676e66 /lib | |
parent | 00080ffcbb05cf23bce8e31f0538567f5b780f89 (diff) |
\s and assignment in conditional
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@72 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/thread.rb | 8 | ||||
-rw-r--r-- | lib/tk.rb | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/thread.rb b/lib/thread.rb index 8f7f6cdd6a..c47d7b20a4 100644 --- a/lib/thread.rb +++ b/lib/thread.rb @@ -69,6 +69,10 @@ class Mutex unlock end end + + def num_waiting + @waiting.size + end end class Queue @@ -137,4 +141,8 @@ class SizedQueue<Queue pop = super pop end + + def num_waiting + @waiting.size + @queue_wait.size + end end @@ -26,7 +26,7 @@ module TkComm private :error_at def tk_tcl2ruby(val) - if val.include? ? + if val.include? ?\s return val.split.collect{|v| tk_tcl2ruby(v)} end case val |