edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C585376
File: Initializers.Generated.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C585376  (server)    10/1/2008 2:50 PM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;RandomRubyFixes03
@@ -78,14 +78,14 @@
             ExtendModule(typeof(System.Collections.Generic.IDictionary<System.Object, System.Object>), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__Collections__Generic__IDictionary_Instance), null, new IronRuby.Builtins.RubyModule[] {def17, });
             ExtendModule(typeof(System.Collections.IEnumerable), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__Collections__IEnumerable_Instance), null, new IronRuby.Builtins.RubyModule[] {def17, });
             ExtendModule(typeof(System.Collections.IList), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__Collections__IList_Instance), null, new IronRuby.Builtins.RubyModule[] {def17, });
-            ExtendModule(typeof(System.IComparable), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__IComparable_Instance), null, new IronRuby.Builtins.RubyModule[] {def26, });
+            IronRuby.Builtins.RubyModule def31 = ExtendModule(typeof(System.IComparable), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__IComparable_Instance), null, new IronRuby.Builtins.RubyModule[] {def26, });
             DefineGlobalClass("Array", typeof(IronRuby.Builtins.RubyArray), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadArray_Instance), new System.Action<IronRuby.Builtins.RubyModule>(LoadArray_Class), new IronRuby.Builtins.RubyModule[] {def17, }, new System.Delegate[] {
                 new System.Func<IronRuby.Builtins.RubyClass, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArrayOps.CreateArray),
                 new System.Func<IronRuby.Runtime.RubyScope, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyClass, System.Object, System.Object>(IronRuby.Builtins.ArrayOps.CreateArray),
                 new System.Func<IronRuby.Builtins.RubyClass, System.Int32, System.Object, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArrayOps.CreateArray),
             });
             DefineGlobalClass("Binding", typeof(IronRuby.Builtins.Binding), Context.ObjectClass, null, null, IronRuby.Builtins.RubyModule.EmptyArray, null);
-            DefineGlobalClass("ClrString", typeof(System.String), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadClrString_Instance), null, IronRuby.Builtins.RubyModule.EmptyArray, null);
+            DefineGlobalClass("ClrString", typeof(System.String), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadClrString_Instance), null, new IronRuby.Builtins.RubyModule[] {def31, }, null);
             DefineGlobalClass("Dir", typeof(IronRuby.Builtins.RubyDir), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadDir_Instance), new System.Action<IronRuby.Builtins.RubyModule>(LoadDir_Class), new IronRuby.Builtins.RubyModule[] {def17, }, null);
             #if !SILVERLIGHT
             DefineGlobalClass("Encoding", typeof(IronRuby.Builtins.RubyEncoding), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadEncoding_Instance), new System.Action<IronRuby.Builtins.RubyModule>(LoadEncoding_Class), IronRuby.Builtins.RubyModule.EmptyArray, new System.Delegate[] {
@@ -2368,7 +2368,7 @@
             });
             
             module.DefineLibraryMethod("instance_variable_defined?", 0x29, new System.Delegate[] {
-                new System.Func<IronRuby.Runtime.RubyContext, System.Object, Microsoft.Scripting.SymbolId, System.Boolean>(IronRuby.Builtins.KernelOps.InstanceVariableDefined),
+                new System.Func<IronRuby.Runtime.RubyScope, System.Object, Microsoft.Scripting.SymbolId, System.Boolean>(IronRuby.Builtins.KernelOps.InstanceVariableDefined),
                 new System.Func<IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Boolean>(IronRuby.Builtins.KernelOps.InstanceVariableDefined),
             });
             
@@ -2511,7 +2511,7 @@
             });
             
             module.DefineLibraryMethod("remove_instance_variable", 0x2a, new System.Delegate[] {
-                new System.Func<IronRuby.Runtime.RubyContext, System.Object, Microsoft.Scripting.SymbolId, System.Object>(IronRuby.Builtins.KernelOps.RemoveInstanceVariable),
+                new System.Func<IronRuby.Runtime.RubyScope, System.Object, Microsoft.Scripting.SymbolId, System.Object>(IronRuby.Builtins.KernelOps.RemoveInstanceVariable),
                 new System.Func<IronRuby.Runtime.RubyScope, System.Object, System.Object, System.Object>(IronRuby.Builtins.KernelOps.RemoveInstanceVariable),
             });
             
@@ -3618,6 +3618,10 @@
                 new System.Func<IronRuby.Builtins.Proc, System.Int32>(IronRuby.Builtins.ProcOps.GetArity),
             });
             
+            module.DefineLibraryMethod("binding", 0x29, new System.Delegate[] {
+                new System.Func<IronRuby.Builtins.Proc, IronRuby.Builtins.Binding>(IronRuby.Builtins.ProcOps.GetLocalScope),
+            });
+            
             module.DefineRuleGenerator("call", 0x29, IronRuby.Builtins.ProcOps.Call());
             
             module.DefineLibraryMethod("clone", 0x29, new System.Delegate[] {
@@ -4939,6 +4943,14 @@
                 new System.Func<Microsoft.Scripting.Runtime.CodeContext, System.Threading.Thread, System.Object, System.Object, System.Object>(IronRuby.Builtins.ThreadOps.SetElement),
             });
             
+            module.DefineLibraryMethod("abort_on_exception", 0x29, new System.Delegate[] {
+                new System.Func<System.Threading.Thread, System.Object>(IronRuby.Builtins.ThreadOps.AbortOnException),
+            });
+            
+            module.DefineLibraryMethod("abort_on_exception=", 0x29, new System.Delegate[] {
+                new System.Func<System.Threading.Thread, System.Boolean, System.Object>(IronRuby.Builtins.ThreadOps.AbortOnException),
+            });
+            
             module.DefineLibraryMethod("alive?", 0x29, new System.Delegate[] {
                 new System.Func<System.Threading.Thread, System.Boolean>(IronRuby.Builtins.ThreadOps.IsAlive),
             });
@@ -4957,8 +4969,19 @@
             
             module.DefineLibraryMethod("join", 0x29, new System.Delegate[] {
                 new System.Func<System.Threading.Thread, System.Threading.Thread>(IronRuby.Builtins.ThreadOps.Join),
+                new System.Func<System.Threading.Thread, System.Double, System.Threading.Thread>(IronRuby.Builtins.ThreadOps.Join),
             });
             
+            module.DefineLibraryMethod("key?", 0x29, new System.Delegate[] {
+                new System.Func<System.Threading.Thread, Microsoft.Scripting.SymbolId, System.Object>(IronRuby.Builtins.ThreadOps.HasKey),
+                new System.Func<System.Threading.Thread, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.ThreadOps.HasKey),
+                new System.Func<Microsoft.Scripting.Runtime.CodeContext, System.Threading.Thread, System.Object, System.Object>(IronRuby.Builtins.ThreadOps.HasKey),
+            });
+            
+            module.DefineLibraryMethod("keys", 0x29, new System.Delegate[] {
+                new System.Func<Microsoft.Scripting.Runtime.CodeContext, System.Threading.Thread, System.Object>(IronRuby.Builtins.ThreadOps.Keys),
+            });
+            
             module.DefineLibraryMethod("kill", 0x29, new System.Delegate[] {
                 new System.Func<System.Threading.Thread, System.Threading.Thread>(IronRuby.Builtins.ThreadOps.Kill),
             });
@@ -4990,6 +5013,14 @@
         }
         
         private void LoadThread_Class(IronRuby.Builtins.RubyModule/*!*/ module) {
+            module.DefineLibraryMethod("abort_on_exception", 0x31, new System.Delegate[] {
+                new System.Func<System.Object, System.Object>(IronRuby.Builtins.ThreadOps.GlobalAbortOnException),
+            });
+            
+            module.DefineLibraryMethod("abort_on_exception=", 0x31, new System.Delegate[] {
+                new System.Func<System.Object, System.Boolean, System.Object>(IronRuby.Builtins.ThreadOps.GlobalAbortOnException),
+            });
+            
             module.DefineLibraryMethod("critical", 0x31, new System.Delegate[] {
                 new System.Func<System.Object, System.Boolean>(IronRuby.Builtins.ThreadOps.Critical),
             });
===================================================================
edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs;C585376
File: KernelOps.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs;C585376  (server)    10/1/2008 2:49 PM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs;RandomRubyFixes03
@@ -1109,9 +1109,9 @@
         }
 
         [RubyMethod("instance_variable_defined?")]
-        public static bool InstanceVariableDefined(RubyContext/*!*/ context, object/*!*/ self, SymbolId name) {
+        public static bool InstanceVariableDefined(RubyScope/*!*/ scope, object/*!*/ self, SymbolId name) {
             object value;
-            if (!context.ExecutionContext.TryGetInstanceVariable(self, name, out value)) {
+            if (!scope.ExecutionContext.TryGetInstanceVariable(self, name, out value)) {
                 // We didn't find it, check if the name is valid
                 CheckInstanceVarName(name);
                 return false;
@@ -1122,13 +1122,13 @@
 
         [RubyMethod("instance_variable_defined?")]
         public static bool InstanceVariableDefined(RubyScope/*!*/ scope, object/*!*/ self, object name) {
-            return InstanceVariableDefined(scope.RubyContext, self, Protocols.CastToSymbol(scope, name));
+            return InstanceVariableDefined(scope, self, Protocols.CastToSymbol(scope, name));
         }
 
         [RubyMethod("remove_instance_variable", RubyMethodAttributes.PrivateInstance)]
-        public static object RemoveInstanceVariable(RubyContext/*!*/ context, object/*!*/ self, SymbolId name) {
+        public static object RemoveInstanceVariable(RubyScope/*!*/ scope, object/*!*/ self, SymbolId name) {
             object value;
-            if (!context.ExecutionContext.TryRemoveInstanceVariable(self, name, out value)) {
+            if (!scope.ExecutionContext.TryRemoveInstanceVariable(self, name, out value)) {
                 // We didn't find it, check if the name is valid
                 CheckInstanceVarName(name);
 
===================================================================
edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MutableStringOps.cs;C577943
File: MutableStringOps.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MutableStringOps.cs;C577943  (server)    9/29/2008 1:25 PM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MutableStringOps.cs;RandomRubyFixes03
@@ -2652,6 +2652,7 @@
                             break;
 
                         case 'i':
+                        case 'l':
                             count = CalculateCounts(stream, directive.Count, sizeof(int), out nilCount);
                             for (int j = 0; j < count; j++) {
                                 result.Add((int)reader.ReadInt32());
@@ -2659,6 +2660,7 @@
                             break;
 
                         case 'I':
+                        case 'L':
                             count = CalculateCounts(stream, directive.Count, sizeof(uint), out nilCount);
                             for (int j = 0; j < count; j++) {
                                 unchecked {
===================================================================
edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ProcOps.cs;C584394
File: ProcOps.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ProcOps.cs;C584394  (server)    10/2/2008 8:34 AM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ProcOps.cs;RandomRubyFixes03
@@ -45,7 +45,10 @@
             return parameters;
         }
 
-        //    binding
+        [RubyMethod("binding", RubyMethodAttributes.PublicInstance)]
+        public static Binding/*!*/ GetLocalScope(Proc/*!*/ self) {
+            return new Binding(self.LocalScope);
+        }
 
         [RubyMethod("[]", RubyMethodAttributes.PublicInstance)]
         [RubyMethod("call", RubyMethodAttributes.PublicInstance)]
===================================================================
edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs;C576154
File: ThreadOps.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs;C576154  (server)    10/2/2008 8:41 AM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs;RandomRubyFixes03
@@ -18,20 +18,24 @@
 using System.Linq.Expressions;
 using Microsoft.Scripting;
 using System.Scripting.Actions;
+using Microsoft.Scripting.Actions;
 using Microsoft.Scripting.Runtime;
+using Microsoft.Scripting.Utils;
 using System.Threading;
-using Microsoft.Scripting.Actions;
 using IronRuby.Runtime;
 
 namespace IronRuby.Builtins {
     [RubyClass("Thread", Extends = typeof(Thread), Inherits = typeof(object))]
     public static class ThreadOps {
+        static bool _globalAbortOnException;
+
         internal class RubyThreadInfo {
             private static readonly Dictionary<int, RubyThreadInfo> _mapping = new Dictionary<int, RubyThreadInfo>();
             private readonly Dictionary<SymbolId, object> _threadLocalStorage;
             private readonly int _id;
             private ThreadGroup _group;
             private readonly Thread _thread;
+            private bool _abortOnException;
 
             private RubyThreadInfo(Thread thread) {
                 _threadLocalStorage = new Dictionary<SymbolId, object>();
@@ -68,17 +72,37 @@
                 }
                 set {
                     lock (_threadLocalStorage) {
-                        _threadLocalStorage[key] = value;
+                        if (value == null) {
+                            _threadLocalStorage.Remove(key);
+                        } else {
+                            _threadLocalStorage[key] = value;
+                        }
                     }
                 }
             }
 
+            internal bool HasKey(SymbolId key) {
+                lock (_threadLocalStorage) {
+                    return _threadLocalStorage.ContainsKey(key);
+                }
+            }
+
+            internal RubyArray GetKeys() {
+                lock (_threadLocalStorage) {
+                    RubyArray result = new RubyArray(_threadLocalStorage.Count);
+                    foreach (SymbolId key in _threadLocalStorage.Keys) {
+                        result.Add(key);
+                    }
+                    return result;
+                }
+            }
+
             internal ThreadGroup Group {
                 get {
                     return _group;
                 }
                 set {
-                    _group = value;
+                    Interlocked.Exchange(ref _group, value);
                 }
             }
 
@@ -88,23 +112,48 @@
                 }
             }
 
+            internal Exception Exception { get; set; }
+            internal object Result { get; set; }
+
+            internal bool AbortOnException {
+                get {
+                    return _abortOnException;
+                }
+                set {
+                    _abortOnException = value;
+                }
+            }
+
             internal static RubyThreadInfo[] Threads {
                 get {
-                    List<RubyThreadInfo> result = new List<RubyThreadInfo>();
                     lock (_mapping) {
+                        List<RubyThreadInfo> result = new List<RubyThreadInfo>(_mapping.Count);
                         foreach (KeyValuePair<int, RubyThreadInfo> entry in _mapping) {
-                            result.Add(entry.Value);
+                            if (entry.Value.Thread.IsAlive) {
+                                result.Add(entry.Value);
+                            }
                         }
+                        return result.ToArray();
                     }
-                    return result.ToArray();
                 }
             }
         }
 
-//  declared private instance methods:
-//    initialize
-//  declared protected instance methods:
-//  declared public instance methods:
+        //  declared private instance methods:
+        //    initialize
+        //  declared protected instance methods:
+        //  declared public instance methods:
+
+        private static Exception MakeKeyTypeException(CodeContext context, object key) {
+            if (key == null) {
+                return RubyExceptions.CreateTypeError("nil is not a symbol");
+            } else {
+                MutableString repr = Protocols.ConvertToString(context, key);
+                string message = String.Format("{0} is not a symbol", repr.ToString());
+                return RubyExceptions.CreateArgumentError(message);
+            }
+        }
+
         [RubyMethod("[]")]
         public static object GetElement(Thread/*!*/ self, SymbolId key) {
             RubyThreadInfo info = RubyThreadInfo.FromThread(self);
@@ -118,7 +167,7 @@
 
         [RubyMethod("[]")]
         public static object GetElement(CodeContext/*!*/ context, Thread/*!*/ self, object key) {
-            return GetElement(self, Protocols.CastToSymbol(context, key));
+            throw MakeKeyTypeException(context, key);
         }
 
         [RubyMethod("[]=")]
@@ -135,12 +184,22 @@
 
         [RubyMethod("[]=")]
         public static object SetElement(CodeContext/*!*/ context, Thread/*!*/ self, object key, object value) {
-            return SetElement(self, Protocols.CastToSymbol(context, key), value);
+            throw MakeKeyTypeException(context, key);
         }
 
-        // abort_on_exception
-        // abort_on_exception=
+        [RubyMethod("abort_on_exception")]
+        public static object AbortOnException(Thread/*!*/ self) {
+            RubyThreadInfo info = RubyThreadInfo.FromThread(self);
+            return info.AbortOnException;
+        }
 
+        [RubyMethod("abort_on_exception=")]
+        public static object AbortOnException(Thread/*!*/ self, bool value) {
+            RubyThreadInfo info = RubyThreadInfo.FromThread(self);
+            info.AbortOnException = value;
+            return value;
+        }
+
         [RubyMethod("alive?")]
         public static bool IsAlive(Thread/*!*/ self) {
             RubyThreadInfo.RegisterThread(Thread.CurrentThread);
@@ -174,18 +233,42 @@
 
             result.Append('>');
             return result;
-        }  
+        }
 
         [RubyMethod("join")]
         public static Thread/*!*/ Join(Thread/*!*/ self) {
             RubyThreadInfo.RegisterThread(Thread.CurrentThread);
 
-            if (!(self.ThreadState == ThreadState.AbortRequested || self.ThreadState == ThreadState.Aborted))
+            if (!(self.ThreadState == ThreadState.AbortRequested || self.ThreadState == ThreadState.Aborted)) {
                 self.Join();
+            }
 
+            Exception threadException = RubyThreadInfo.FromThread(self).Exception;
+            if (threadException != null) {
+                throw threadException;
+            }
+
             return self;
         }
 
+        [RubyMethod("join")]
+        public static Thread/*!*/ Join(Thread/*!*/ self, double timeout) {
+            RubyThreadInfo.RegisterThread(Thread.CurrentThread);
+
+            if (!(self.ThreadState == ThreadState.AbortRequested || self.ThreadState == ThreadState.Aborted)) {
+                if (!self.Join((int)(timeout * 1000))) {
+                    return null;
+                }
+            }
+
+            Exception threadException = RubyThreadInfo.FromThread(self).Exception;
+            if (threadException != null) {
+                throw threadException;
+            }
+
+            return self;
+        }
+
         [RubyMethod("kill")]
         [RubyMethod("exit")]
         [RubyMethod("terminate")]
@@ -195,13 +278,33 @@
             return self;
         }
 
-//    key?
-//    keys
-//    priority
-//    priority=
-//    raise
-//    safe_level
+        [RubyMethod("key?")]
+        public static object HasKey(Thread/*!*/ self, SymbolId key) {
+            RubyThreadInfo info = RubyThreadInfo.FromThread(self);
+            return info.HasKey(key);
+        }
 
+        [RubyMethod("key?")]
+        public static object HasKey(Thread/*!*/ self, [NotNull]MutableString/*!*/ key) {
+            return HasKey(self, key.ConvertToSymbol());
+        }
+
+        [RubyMethod("key?")]
+        public static object HasKey(CodeContext/*!*/ context, Thread/*!*/ self, object key) {
+            throw MakeKeyTypeException(context, key);
+        }
+
+        [RubyMethod("keys")]
+        public static object Keys(CodeContext/*!*/ context, Thread/*!*/ self) {
+            RubyThreadInfo info = RubyThreadInfo.FromThread(self);
+            return info.GetKeys();
+        }
+
+        //    priority
+        //    priority=
+        //    raise
+        //    safe_level
+
         // TODO: these two methods interrupt a sleeping thread via the Thread.Interrupt API.
         // Unfortunately, this API interrupts the sleeping thread by throwing a ThreadInterruptedException.
         // In many Ruby programs (eg the specs) this causes the thread to terminate, which is NOT the
@@ -237,18 +340,28 @@
 
         [RubyMethod("value")]
         public static object Value(Thread/*!*/ self) {
-            RubyThreadInfo.RegisterThread(Thread.CurrentThread);
-            throw new NotImplementedError("waiting for place to put result of running thread");
+            Join(self);
+            return RubyThreadInfo.FromThread(self).Result;
         }
 
-//    stop?
+        //    stop?
 
-//  declared singleton methods:
-//    abort_on_exception
-//    abort_on_exception=
-//    critical
-//    critical=
+        //  declared singleton methods
 
+        [RubyMethod("abort_on_exception", RubyMethodAttributes.PublicSingleton)]
+        public static object GlobalAbortOnException(object self) {
+            return _globalAbortOnException;
+        }
+
+        [RubyMethod("abort_on_exception=", RubyMethodAttributes.PublicSingleton)]
+        public static object GlobalAbortOnException(object self, bool value) {
+            _globalAbortOnException = value;
+            return value;
+        }
+
+        //    critical
+        //    critical=
+
         [RubyMethod("critical", RubyMethodAttributes.PublicSingleton)]
         public static bool Critical(object self) {
             RubyThreadInfo.RegisterThread(Thread.CurrentThread);
@@ -267,8 +380,8 @@
             return Thread.CurrentThread;
         }
 
-//    exclusive
-//    fork
+        //    exclusive
+        //    fork
         [RubyMethod("list", RubyMethodAttributes.PublicSingleton)]
         public static RubyArray/*!*/ List(object self) {
             RubyThreadInfo.RegisterThread(Thread.CurrentThread);
@@ -281,11 +394,11 @@
                     result.Add(thread);
                 }
             }
-            
+
             return result;
         }
 
-//    main
+        //    main
 
         [RubyMethod("new", RubyMethodAttributes.PublicSingleton)]
         [RubyMethod("start", RubyMethodAttributes.PublicSingleton)]
@@ -293,25 +406,29 @@
             if (startRoutine == null) {
                 throw new ThreadError("must be called with a block");
             }
+            ThreadGroup group = Group(Thread.CurrentThread);
             Thread result = new Thread(new ThreadStart(delegate() {
+                RubyThreadInfo info = RubyThreadInfo.FromThread(Thread.CurrentThread);
+                info.Group = group;
+
                 try {
                     object threadResult;
                     // TODO: break?
                     startRoutine.Yield(args, out threadResult);
-                    // TODO: Store result where it can be retrieved
+                    info.Result = threadResult;
 #if !SILVERLIGHT
                 } catch (ThreadInterruptedException) {
                     // Do nothing with this for now
 #endif
-                } catch (Exception) {
-                    // TODO: Store exception where it can be retrieved
-                    throw;
+                } catch (Exception e) {
+                    info.Exception = e;
+
+                    if (_globalAbortOnException || info.AbortOnException) {
+                        throw;
+                    }
                 }
             }));
 
-            RubyThreadInfo info = RubyThreadInfo.FromThread(result);
-            info.Group = Group(Thread.CurrentThread);
-            
             result.Start();
             return result;
         }
@@ -329,4 +446,4 @@
             Thread.Sleep(Timeout.Infinite);
         }
     }
-}
\ No newline at end of file
+}
===================================================================
edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;C584394
File: RubyExceptionData.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;C584394  (server)    10/2/2008 11:28 AM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;RandomRubyFixes03
@@ -68,6 +68,9 @@
             result = _backtrace;
 #else
             result = new RubyArray();
+            if (_throwSiteTrace == null) {
+                SetCompiledTrace();
+            }
             AddBacktrace(result, _throwSiteTrace.GetFrames(), hasFileAccessPermissions, skipFrames);
 #endif
             if (_catchSiteTrace != null) {
===================================================================
edit: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs;C585376
File: RubyUtils.cs
===================================================================
--- $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs;C585376  (server)    10/1/2008 2:40 PM
+++ Shelved Change: $/Dev10/feature/vsl_dynamic/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs;RandomRubyFixes03
@@ -119,34 +119,40 @@
         public static MutableString/*!*/ ObjectToMutableString(RubyScope/*!*/ scope, object obj) {
             RubyExecutionContext ec = scope.ExecutionContext;
 
-            MutableString str = MutableString.CreateMutable();
-            str.Append("#<");
-            str.Append(ec.GetClassOf(obj).Name);
+            using (IDisposable handle = RubyUtils.InfiniteInspectTracker.TrackObject(obj)) {
+                if (handle == null) {
+                    return MutableString.Create("...");
+                }
 
-            // Ruby prints 2*object_id for objects
-            str.Append(':');
-            AppendFormatHexObjectId(str, GetObjectId(ec, obj));
+                MutableString str = MutableString.CreateMutable();
+                str.Append("#<");
+                str.Append(ec.GetClassOf(obj).Name);
 
-            // display instance variables
-            RubyInstanceData data = ec.TryGetInstanceData(obj);
-            if (data != null) {
-                List<KeyValuePair<SymbolId, object>> vars = data.GetInstanceVariablePairs();
-                bool first = true;
-                foreach (KeyValuePair<SymbolId, object> var in vars) {
-                    if (first) {
-                        str.Append(" ");
-                        first = false;
-                    } else {
-                        str.Append(", ");
+                // Ruby prints 2*object_id for objects
+                str.Append(':');
+                AppendFormatHexObjectId(str, GetObjectId(ec, obj));
+
+                // display instance variables
+                RubyInstanceData data = ec.TryGetInstanceData(obj);
+                if (data != null) {
+                    List<KeyValuePair<SymbolId, object>> vars = data.GetInstanceVariablePairs();
+                    bool first = true;
+                    foreach (KeyValuePair<SymbolId, object> var in vars) {
+                        if (first) {
+                            str.Append(" ");
+                            first = false;
+                        } else {
+                            str.Append(", ");
+                        }
+                        str.Append(SymbolTable.IdToString(var.Key));
+                        str.Append("=");
+                        str.Append(RubySites.Inspect(scope, var.Value));
                     }
-                    str.Append(SymbolTable.IdToString(var.Key));
-                    str.Append("=");
-                    str.Append(RubySites.Inspect(scope, var.Value));
                 }
+                str.Append(">");
+
+                return str;
             }
-            str.Append(">");
-
-            return str;
         }
 
         public static MutableString/*!*/ AppendFormatHexObjectId(MutableString/*!*/ str, int objectId) {
===================================================================
