edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C691193
File: Initializers.Generated.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C691193  (server)    1/5/2009 10:05 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;critical
@@ -5171,7 +5171,7 @@
             });
             
             module.DefineLibraryMethod("critical=", 0x61, new System.Delegate[] {
-                new System.Func<System.Object, System.Boolean, System.Boolean>(IronRuby.Builtins.ThreadOps.Critical),
+                new System.Action<System.Object, System.Boolean>(IronRuby.Builtins.ThreadOps.Critical),
             });
             
             module.DefineLibraryMethod("current", 0x61, new System.Delegate[] {
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs;C691193
File: ThreadOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs;C691193  (server)    1/4/2009 11:36 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs;critical
@@ -39,6 +39,8 @@
     [RubyClass("Thread", Extends = typeof(Thread), Inherits = typeof(object))]
     public static class ThreadOps {
         static bool _globalAbortOnException;
+        static readonly object _CriticalMonitor = new object();
+        static bool _IsInCriticalRegion;
 
         private class ThreadExitMarker {
         }
@@ -540,19 +542,22 @@
             return value;
         }
 
-        //    critical
-        //    critical=
-
         [RubyMethod("critical", RubyMethodAttributes.PublicSingleton)]
         public static bool Critical(object self) {
             RubyThreadInfo.RegisterThread(Thread.CurrentThread);
-            return false;
+            return _IsInCriticalRegion;
         }
 
         [RubyMethod("critical=", RubyMethodAttributes.PublicSingleton)]
-        public static bool Critical(object self, bool value) {
+        public static void Critical(object self, bool value) {
             RubyThreadInfo.RegisterThread(Thread.CurrentThread);
-            return false;
+            if (value) {
+                Monitor.Enter(_CriticalMonitor);
+                _IsInCriticalRegion = true;
+            } else {
+                _IsInCriticalRegion = false;
+                Monitor.Exit(_CriticalMonitor);
+            }
         }
 
         [RubyMethod("current", RubyMethodAttributes.PublicSingleton)]
===================================================================
