delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/broadcast_tags.txt;C966724
File: broadcast_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/broadcast_tags.txt;C966724  (server)    11/23/2009 5:35 PM
+++ [no target file]
@@ -1,2 +1,0 @@
-fails:ConditionVariable#broadcast should return self if something is waiting for a broadcast
-fails:ConditionVariable#broadcast releases all threads waiting in line for this resource
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/signal_tags.txt;C966724
File: signal_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/signal_tags.txt;C966724  (server)    11/23/2009 5:36 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/signal_tags.txt;CV
@@ -1,2 +1,1 @@
-fails:ConditionVariable#signal should return self if something is waiting for a signal
 fails:ConditionVariable#signal releases the first thread waiting in line for this resource
===================================================================
delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/wait_tags.txt;C966724
File: wait_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/conditionvariable/wait_tags.txt;C966724  (server)    11/23/2009 5:36 PM
+++ [no target file]
@@ -1,1 +1,0 @@
-fails:ConditionVariable#wait should return self
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Driver.cs;C1204880
File: Driver.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Driver.cs;C1204880  (server)    11/23/2009 5:39 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Driver.cs;CV
@@ -28,6 +28,8 @@
 using System.Diagnostics;
 using System.Reflection;
 using System.Text;
+using System.Globalization;
+using System.Threading;
 
 namespace IronRuby.Tests {
     public class TestCase {
@@ -276,6 +278,13 @@
         }       
 
         public static int Run(List<string>/*!*/ args) {
+            // Can be set to nl-BE, ja-JP, etc
+            string culture = Environment.GetEnvironmentVariable("IR_CULTURE");
+            if (culture != null) {
+                Thread.CurrentThread.CurrentCulture = new CultureInfo(culture, false);
+                Console.WriteLine("Current culture: {0}", Thread.CurrentThread.CurrentCulture);
+            }
+
             if (!ParseArguments(args)) {
                 return -3;
             }
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Thread/RubyConditionVariable.cs;C791094
File: RubyConditionVariable.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Thread/RubyConditionVariable.cs;C791094  (server)    11/23/2009 5:32 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Thread/RubyConditionVariable.cs;CV
@@ -21,6 +21,8 @@
     [RubyClass("ConditionVariable")]
     public class RubyConditionVariable {
         private RubyMutex _mutex;
+        private readonly AutoResetEvent _signal = new AutoResetEvent(false);
+        private int _waits;
 
         public RubyConditionVariable() {
         }
@@ -29,7 +31,7 @@
         public static RubyConditionVariable/*!*/ Signal(RubyConditionVariable/*!*/ self) {
             RubyMutex m = self._mutex;
             if (m != null) {
-                Monitor.Pulse(m);
+                self._signal.Set();
             }
             return self;
         }
@@ -38,7 +40,21 @@
         public static RubyConditionVariable/*!*/ Broadcast(RubyConditionVariable/*!*/ self) {
             RubyMutex m = self._mutex;
             if (m != null) {
-                Monitor.PulseAll(m);
+                lock (self._signal) {
+                    int waits = self._waits;
+                    for (int i = 0; i < waits; i++) {
+                        self._signal.Set();
+                        //
+                        // WARNING
+                        //
+                        // There is no guarantee that every call to the Set method will release a waiting thread.
+                        // If two calls are too close together, so that the second call occurs before a thread 
+                        // has been released, only one thread is released. 
+                        // We add a sleep to increase the chance that all waiting threads will be released.
+                        //
+                        Thread.CurrentThread.Join(1);
+                    }
+                }
             }
             return self;
         }
@@ -46,7 +62,13 @@
         [RubyMethod("wait")]
         public static RubyConditionVariable/*!*/ Wait(RubyConditionVariable/*!*/ self, [NotNull]RubyMutex/*!*/ mutex) {
             self._mutex = mutex;
-            Monitor.Wait(mutex.Mutex);
+            RubyMutex.Unlock(mutex);
+            lock (self._signal) { self._waits++; }
+
+            self._signal.WaitOne();
+
+            lock (self._signal) { self._waits--; }
+            RubyMutex.Lock(mutex);
             return self;
         }
 
===================================================================
