<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -372,7 +372,6 @@ namespace IronRuby.Tests {
                 ClrOverloadSelection2,
                 ClrInterfaces1,
                 ClrInterfaces2,
-                ClrRequireAssembly1,
                 ClrInclude1,
                 ClrNew1,
                 ClrNew2,
@@ -388,7 +387,7 @@ namespace IronRuby.Tests {
                 ClrOverride1,
                 ClrOverride2,
                 ClrOverride3,
-                ClrOverride4,
+                //TODO: Fix ClrOverride4,
                 ClrConstructor1,
                 ClrConstructor2,
                 ClrConstructor3,</diff>
      <filename>Merlin/Main/Languages/Ruby/IronRuby.Tests/RubyTests.cs</filename>
    </modified>
    <modified>
      <diff>@@ -47,7 +47,9 @@ namespace InteropTests.Generics1 {
 }
 
 namespace IronRuby.Tests {
-    public partial class Tests {        
+    public partial class Tests {
+        #region Members: Fields, Methods, Properties, Indexers
+
 #pragma warning disable 169 // private field not used
         public class ClassWithFields {
             public int Field = 1;
@@ -197,7 +199,7 @@ p m[]
 
 p m = a.clr_member(:binary_search)
 p m.clr_members.size
-p m.overloads(Object).clr_members
+p m.overload(Object).clr_members
 &quot;, @&quot;
 #&lt;Method: Array#count&gt;
 3
@@ -216,6 +218,42 @@ false
 &quot;);
         }
 
+        public class ClassWithIndexer1 {
+            public int[,] Values = new int[,] { { 0, 10 }, { 20, 30 } };
+
+            public int this[int i, int j] { get { return Values[i, j]; } set { Values[i, j] = value; } }
+        }
+
+        public void ClrIndexers1() {
+            Context.ObjectClass.SetConstant(&quot;CI&quot;, Context.GetClass(typeof(ClassWithIndexer1)));
+
+            // default indexers:
+            AssertOutput(() =&gt; CompilerTest(@&quot;
+c = CI.new
+c[0,1] += 1
+p c[0, 1]
+&quot;), @&quot;
+11
+&quot;);
+            // non-default indexers:
+            // TODO: We need to use VB or generate IL to test this.
+            // TODO: improve access
+            //   If a property accessor with parameters is called without arguments the result is a PropertyAccessor object with [], []= defined.
+            //   Then the calls could look like c.foo[1,2] = 3. 
+
+            //            AssertOutput(() =&gt; CompilerTest(@&quot;
+            //c = CI.new
+            //c.method(:foo=).call(1, 0, c.method(:foo).call(1, 0) + 5)
+            //p c.method(:foo).call(1, 0)
+            //&quot;), @&quot;
+            //25
+            //&quot;);
+        }
+
+        #endregion
+
+        #region Visibility
+
         public class ProtectedA {
             protected string Foo(int a) { return &quot;Foo(I): &quot; + a; }
             public string Bar(int a) { return &quot;Bar(I): &quot; + a; }
@@ -347,6 +385,146 @@ Baz(I): 1
 &quot;);
         }
 
+        #endregion
+
+        #region Member Enumeration
+
+        /// &lt;summary&gt;
+        /// No CLR names should be returned for builtin types and singletons.
+        /// &lt;/summary&gt;
+        public void ClrMethodEnumeration1() {
+            // built-ins:
+            var irModules = new[] { &quot;IronRuby&quot; };
+
+            using (Context.ClassHierarchyLocker()) {
+                Context.ObjectClass.EnumerateConstants((module, name, value) =&gt; {
+                    RubyModule m = value as RubyModule;
+                    if (m != null &amp;&amp; Array.IndexOf(irModules, m.Name) == -1) {
+                        AssertNoClrNames(ModuleOps.GetInstanceMethods(m, true), m.Name);
+                        AssertNoClrNames(ModuleOps.GetPrivateInstanceMethods(m, true), m.Name);
+                        AssertNoClrNames(ModuleOps.GetInstanceMethods(m.SingletonClass, true), m.Name);
+                        AssertNoClrNames(ModuleOps.GetPrivateInstanceMethods(m.SingletonClass, true), m.Name);
+                    }
+                    return false;
+                });
+            }
+
+            // singletons:
+            AssertNoClrNames(Engine.Execute(@&quot;class &lt;&lt; self; instance_methods + private_instance_methods; end&quot;), null);
+            AssertNoClrNames(Engine.Execute(@&quot;class &lt;&lt; self; class &lt;&lt; self; instance_methods + private_instance_methods; end; end&quot;), null);
+            AssertNoClrNames(Engine.Execute(@&quot;class &lt;&lt; Class; instance_methods + private_instance_methods; end&quot;), null);
+        }
+
+        public void ClrMethodEnumeration2() {
+            TestOutput(@&quot;
+class System::Decimal
+  instance_methods(false).each do |name|
+    mangled = '__' + name
+    
+    alias_method(mangled, name)
+    private mangled
+    
+    define_method(name) do |*args|
+      puts &quot;&quot;method called: #{name}&quot;&quot;
+      send mangled, *args
+    end
+  end
+end
+x, y = System::Decimal.new(1), System::Decimal.new(2)
+x + y       
+x.CompareTo(y)
+&quot;, @&quot;
+method called: +
+method called: compare_to
+&quot;);
+        }
+
+        private void AssertNoClrNames(object/*!*/ methods, string moduleName) {
+            var array = (RubyArray)methods;
+            int idx = array.FindIndex((name) =&gt; name is ClrName);
+            Assert(idx == -1, moduleName + &quot;::&quot; + (idx == -1 ? null : ((ClrName)array[idx]).ActualName));
+        }
+
+        #endregion
+
+        #region Generic Methods
+
+#pragma warning disable 67 // event not used
+        public class GenericMethods {
+            public static string M0&lt;T&gt;() {
+                return &quot;M0&lt;&quot; + typeof(T).Name + &quot;&gt;()&quot;;
+            }
+
+            public static string M1() {
+                return &quot;M1()&quot;;
+            }
+            
+            public static string M1&lt;T&gt;() {
+                return &quot;M1&lt;&quot; + typeof(T).Name + &quot;&gt;()&quot;;
+            }
+
+            public static string M1&lt;S, T&gt;() {
+                return &quot;M1&lt;&quot; + typeof(S).Name + &quot;, &quot; + typeof(T).Name + &quot;&gt;()&quot;;
+            }
+
+            public static string M1&lt;T&gt;(int foo) {
+                return &quot;M1&lt;&quot; + typeof(T).Name + &quot;&gt;(Fixnum)&quot;;
+            }
+
+            public static string M2(int foo) {
+                return &quot;M2(Fixnum)&quot;;
+            }
+
+            public static string M2&lt;T&gt;(int foo) {
+                return &quot;M2&lt;&quot; + typeof(T).Name + &quot;&gt;(Fixnum)&quot;;
+            }
+
+            public static int Field;
+            public static object Property { get; set; }
+            public static event Action&lt;Object&gt; Event;
+        }
+#pragma warning restore
+
+        public void ClrGenericMethods1() {
+            Context.ObjectClass.SetConstant(&quot;GM&quot;, Context.GetClass(typeof(GenericMethods)));
+            AssertOutput(() =&gt; CompilerTest(@&quot;
+m = GM.method(:M1)
+puts m.call
+puts m.of().call
+puts m.of(String).call
+puts m.of(String, Fixnum).call
+puts m.call(1) rescue p $!
+puts m.of(String, String, String) rescue p $!
+&quot;), @&quot;
+M1()
+M1()
+M1&lt;MutableString&gt;()
+M1&lt;MutableString, Int32&gt;()
+#&lt;ArgumentError: wrong number of arguments (1 for 0)&gt;
+#&lt;ArgumentError: wrong number of generic arguments for `M1'&gt;
+&quot;
+            );
+
+            AssertOutput(() =&gt; CompilerTest(@&quot;
+m = GM.method(:M2)
+puts m.call(1)
+
+puts GM.method(:field).of(Fixnum) rescue p $!
+puts GM.method(:property).of(Fixnum) rescue p $!
+puts GM.method(:event).of(Fixnum) rescue p $!
+&quot;), @&quot;
+M2(Fixnum)
+#&lt;ArgumentError: wrong number of generic arguments for `field'&gt;
+#&lt;ArgumentError: wrong number of generic arguments for `property'&gt;
+#&lt;ArgumentError: wrong number of generic arguments for `event'&gt;
+&quot;
+            );
+        }
+
+        #endregion
+
+        #region Overloads: Inheritance, Selection
+
         public static class OverloadInheritance1 {
             public class A {
                 public string Foo(int a, int b, int c) {
@@ -402,7 +580,7 @@ Baz(I): 1
                 }
             }
         }
-        
+
         public void ClrOverloadInheritance1() {
             Context.ObjectClass.SetConstant(&quot;Obj&quot;, new OverloadInheritance1.C());
 
@@ -426,7 +604,7 @@ Middle: 1
 Skip
 Skip: 1
 &quot;);
-            
+
             AssertOutput(() =&gt; CompilerTest(@&quot;
 p Obj.method(:foo)
 p Obj.method(:bar)
@@ -455,62 +633,6 @@ Hidden: 1, 2
 &quot;);
         }
 
-        /// &lt;summary&gt;
-        /// No CLR names should be returned for builtin types and singletons.
-        /// &lt;/summary&gt;
-        public void ClrMethodEnumeration1() {
-            // built-ins:
-            var irModules = new[] { &quot;IronRuby&quot; };
-
-            using (Context.ClassHierarchyLocker()) {
-                Context.ObjectClass.EnumerateConstants((module, name, value) =&gt; {
-                    RubyModule m = value as RubyModule;
-                    if (m != null &amp;&amp; Array.IndexOf(irModules, m.Name) == -1) {
-                        AssertNoClrNames(ModuleOps.GetInstanceMethods(m, true), m.Name);
-                        AssertNoClrNames(ModuleOps.GetPrivateInstanceMethods(m, true), m.Name);
-                        AssertNoClrNames(ModuleOps.GetInstanceMethods(m.SingletonClass, true), m.Name);
-                        AssertNoClrNames(ModuleOps.GetPrivateInstanceMethods(m.SingletonClass, true), m.Name);
-                    }
-                    return false;
-                });
-            }
-
-            // singletons:
-            AssertNoClrNames(Engine.Execute(@&quot;class &lt;&lt; self; instance_methods + private_instance_methods; end&quot;), null);
-            AssertNoClrNames(Engine.Execute(@&quot;class &lt;&lt; self; class &lt;&lt; self; instance_methods + private_instance_methods; end; end&quot;), null);
-            AssertNoClrNames(Engine.Execute(@&quot;class &lt;&lt; Class; instance_methods + private_instance_methods; end&quot;), null);
-        }
-
-        public void ClrMethodEnumeration2() {
-            TestOutput(@&quot;
-class System::Decimal
-  instance_methods(false).each do |name|
-    mangled = '__' + name
-    
-    alias_method(mangled, name)
-    private mangled
-    
-    define_method(name) do |*args|
-      puts &quot;&quot;method called: #{name}&quot;&quot;
-      send mangled, *args
-    end
-  end
-end
-x, y = System::Decimal.new(1), System::Decimal.new(2)
-x + y       
-x.CompareTo(y)
-&quot;, @&quot;
-method called: +
-method called: compare_to
-&quot;);
-        }
-
-        private void AssertNoClrNames(object/*!*/ methods, string moduleName) {
-            var array = (RubyArray)methods;
-            int idx = array.FindIndex((name) =&gt; name is ClrName);
-            Assert(idx == -1, moduleName + &quot;::&quot; + (idx == -1 ? null : ((ClrName)array[idx]).ActualName));
-        }
-
         public static class OverloadInheritance2 {
             public class A { public virtual string f(int a) { return &quot;f1&quot;; } }
             public class B : A { }
@@ -522,7 +644,7 @@ method called: compare_to
 
             public class X : B { public virtual string f(int a, int b, int c) { return &quot;f3&quot;; } }
             public class Y : X { }
-            
+
             public static void Load(RubyContext/*!*/ context) {
                 context.ObjectClass.SetConstant(&quot;A&quot;, context.GetClass(typeof(A)));
                 context.ObjectClass.SetConstant(&quot;B&quot;, context.GetClass(typeof(B)));
@@ -587,7 +709,7 @@ p D.instance_method(:f).clr_members.collect { |x| x.to_string }  # only one over
 ['System.String f(Int32, Int32)']
 &quot;);
         }
-        
+
         public void ClrOverloadInheritance4() {
             OverloadInheritance2.Load(Context);
 
@@ -660,7 +782,7 @@ f1
             public class D : C {
                 public int Foo(double a) { return 5; }
             }
-            
+
             public static void Load(RubyContext/*!*/ context) {
                 context.ObjectClass.SetConstant(&quot;A&quot;, context.GetClass(typeof(A)));
                 context.ObjectClass.SetConstant(&quot;B&quot;, context.GetClass(typeof(B)));
@@ -678,7 +800,7 @@ f1
         /// &lt;/summary&gt;
         public void ClrOverloadInheritance6() {
             OverloadInheritance6.Load(Context);
-            
+
             TestOutput(@&quot;
 p C.new.method(:foo).clr_members.size
 p D.new.method(:foo).clr_members.size
@@ -715,110 +837,6 @@ p A.new.foo(1)
         // TODO: CLR overloads
         // - alias/pri/pub/pro/mf/dm/generics/explicit-overload
 
-        public class ClassWithIndexer1 {
-            public int[,] Values = new int[,] { {0, 10}, {20, 30} };
-
-            public int this[int i, int j] { get { return Values[i,j]; } set { Values[i,j] = value; } }
-        }
-
-        public void ClrIndexers1() {
-            Context.ObjectClass.SetConstant(&quot;CI&quot;, Context.GetClass(typeof(ClassWithIndexer1)));
-            
-            // default indexers:
-            AssertOutput(() =&gt; CompilerTest(@&quot;
-c = CI.new
-c[0,1] += 1
-p c[0, 1]
-&quot;), @&quot;
-11
-&quot;);
-            // non-default indexers:
-            // TODO: We need to use VB or generate IL to test this.
-            // TODO: improve access
-            //   If a property accessor with parameters is called without arguments the result is a PropertyAccessor object with [], []= defined.
-            //   Then the calls could look like c.foo[1,2] = 3. 
-
-//            AssertOutput(() =&gt; CompilerTest(@&quot;
-//c = CI.new
-//c.method(:foo=).call(1, 0, c.method(:foo).call(1, 0) + 5)
-//p c.method(:foo).call(1, 0)
-//&quot;), @&quot;
-//25
-//&quot;);
-        }
-
-#pragma warning disable 67 // event not used
-        public class GenericMethods {
-            public static string M0&lt;T&gt;() {
-                return &quot;M0&lt;&quot; + typeof(T).Name + &quot;&gt;()&quot;;
-            }
-
-            public static string M1() {
-                return &quot;M1()&quot;;
-            }
-            
-            public static string M1&lt;T&gt;() {
-                return &quot;M1&lt;&quot; + typeof(T).Name + &quot;&gt;()&quot;;
-            }
-
-            public static string M1&lt;S, T&gt;() {
-                return &quot;M1&lt;&quot; + typeof(S).Name + &quot;, &quot; + typeof(T).Name + &quot;&gt;()&quot;;
-            }
-
-            public static string M1&lt;T&gt;(int foo) {
-                return &quot;M1&lt;&quot; + typeof(T).Name + &quot;&gt;(Fixnum)&quot;;
-            }
-
-            public static string M2(int foo) {
-                return &quot;M2(Fixnum)&quot;;
-            }
-
-            public static string M2&lt;T&gt;(int foo) {
-                return &quot;M2&lt;&quot; + typeof(T).Name + &quot;&gt;(Fixnum)&quot;;
-            }
-
-            public static int Field;
-            public static object Property { get; set; }
-            public static event Action&lt;Object&gt; Event;
-        }
-#pragma warning restore
-
-        public void ClrGenericMethods1() {
-            Context.ObjectClass.SetConstant(&quot;GM&quot;, Context.GetClass(typeof(GenericMethods)));
-            AssertOutput(() =&gt; CompilerTest(@&quot;
-m = GM.method(:M1)
-puts m.call
-puts m.of().call
-puts m.of(String).call
-puts m.of(String, Fixnum).call
-puts m.call(1) rescue p $!
-puts m.of(String, String, String) rescue p $!
-&quot;), @&quot;
-M1()
-M1()
-M1&lt;MutableString&gt;()
-M1&lt;MutableString, Int32&gt;()
-#&lt;ArgumentError: wrong number of arguments (1 for 0)&gt;
-#&lt;ArgumentError: wrong number of generic arguments for `M1'&gt;
-&quot;
-            );
-
-            AssertOutput(() =&gt; CompilerTest(@&quot;
-m = GM.method(:M2)
-puts m.call(1)
-
-puts GM.method(:field).of(Fixnum) rescue p $!
-puts GM.method(:property).of(Fixnum) rescue p $!
-puts GM.method(:event).of(Fixnum) rescue p $!
-&quot;), @&quot;
-M2(Fixnum)
-#&lt;ArgumentError: wrong number of generic arguments for `field'&gt;
-#&lt;ArgumentError: wrong number of generic arguments for `property'&gt;
-#&lt;ArgumentError: wrong number of generic arguments for `event'&gt;
-&quot;
-            );
-        }
-
         public class OverloadedMethods {
             public static string M1(RubyScope scope) {
                 return &quot;M1()&quot;;
@@ -875,14 +893,14 @@ M2(Fixnum)
 
             AssertOutput(() =&gt; CompilerTest(@&quot;
 m = OM.method(:M1)
-puts m.overloads.call
-puts m.overloads(String).call('')
-puts m.overloads(Float).call(1.0)
-puts m.overloads(Fixnum, String).call(1, '')
-puts m.overloads(String, String).call('', '')
-puts m.overloads(Fixnum, System::Array.of(Object)).call(1, 2, 3)
-puts m.overloads(Fixnum, Object).call(1, 2)
-puts m.overloads(Fixnum).call(1)
+puts m.overload.call
+puts m.overload(String).call('')
+puts m.overload(Float).call(1.0)
+puts m.overload(Fixnum, String).call(1, '')
+puts m.overload(String, String).call('', '')
+puts m.overload(Fixnum, System::Array.of(Object)).call(1, 2, 3)
+puts m.overload(Fixnum, Object).call(1, 2)
+puts m.overload(Fixnum).call(1)
 &quot;), @&quot;
 M1()
 M1(String)
@@ -900,9 +918,9 @@ m = OM.method(:M2)
 puts m.clr_members.size
 puts m.of.clr_members.size
 puts m.of(Object).clr_members.size
-puts m.overloads(Object).clr_members.size
-puts m.of(Object).overloads(Object).clr_members.size
-puts m.overloads(Object).of(Object).clr_members.size
+puts m.overload(Object).clr_members.size
+puts m.of(Object).overload(Object).clr_members.size
+puts m.overload(Object).of(Object).clr_members.size
 &quot;), @&quot;
 4
 2
@@ -917,8 +935,8 @@ puts m.overloads(Object).of(Object).clr_members.size
 m = OM.method(:M2)
 puts m.call(1)
 puts m.of(Float).call('')
-puts m.of(Float).overloads(Fixnum).call(1)
-puts m.overloads(Object).of(String).call(1)
+puts m.of(Float).overload(Fixnum).call(1)
+puts m.overload(Object).of(String).call(1)
 &quot;), @&quot;
 M2(Fixnum)
 M2&lt;Double&gt;(Object)
@@ -929,8 +947,8 @@ M2&lt;MutableString&gt;(Object)
 
             AssertOutput(() =&gt; CompilerTest(@&quot;
 m = OM.method(:M2)
-m.overloads(Object, String) rescue p $!
-m.overloads() rescue p $!
+m.overload(Object, String) rescue p $!
+m.overload() rescue p $!
 &quot;), @&quot;
 #&lt;ArgumentError: no overload of `M2' matches given parameter types&gt;
 #&lt;ArgumentError: no overload of `M2' matches given parameter types&gt;
@@ -947,12 +965,12 @@ def bar a,*b
   [a,*b]
 end
 
-p method(:foo).overloads(Object, Object).call(1,2)
-method(:foo).overloads(Object) rescue p $!
+p method(:foo).overload(Object, Object).call(1,2)
+method(:foo).overload(Object) rescue p $!
 
-p method(:bar).overloads(Object).call(1)
-p method(:bar).overloads(Object, Object).call(1,2)
-p method(:bar).overloads(Object, Object, Object).call(1,2,3)
+p method(:bar).overload(Object).call(1)
+p method(:bar).overload(Object, Object).call(1,2)
+p method(:bar).overload(Object, Object, Object).call(1,2,3)
 &quot;), @&quot;
 [1, 2]
 #&lt;ArgumentError: no overload of `foo' matches given parameter types&gt;
@@ -970,8 +988,8 @@ class C
   
   c = new
   c.foo = 1
-  p instance_method(:foo).overloads.bind(c).call
-  instance_method(:foo=).overloads(Object).bind(c).call(2)
+  p instance_method(:foo).overload.bind(c).call
+  instance_method(:foo=).overload(Object).bind(c).call(2)
   p c.foo
 end
 &quot;), @&quot;
@@ -1010,14 +1028,11 @@ end
         public void ClrOverloadSelection2() {
             OverloadSelection2.Load(Context);
 
-            // TODO: constructor overload selection
-            // B.overloads(Fixnum).new(1) ???
-
             // static methods:
             TestOutput(@&quot;
 m = B.method(:foo)
-puts m.overloads(Fixnum).clr_members.size          # RubyScope and BlockParam are hidden
-puts m.overloads(System::String) rescue p $!       # RubyClass is not hidden here
+puts m.overload(Fixnum).clr_members.size          # RubyScope and BlockParam are hidden
+puts m.overload(System::String) rescue p $!       # RubyClass is not hidden here
 &quot;, @&quot;
 1
 #&lt;ArgumentError: no overload of `foo' matches given parameter types&gt;
@@ -1027,9 +1042,9 @@ puts m.overloads(System::String) rescue p $!       # RubyClass is not hidden her
             TestOutput(@&quot;
 m = method(:print)
 puts m.arity
-puts m.overloads().arity
-puts m.overloads(Object).arity
-puts m.overloads(System::Array[Object]).arity
+puts m.overload().arity
+puts m.overload(Object).arity
+puts m.overload(System::Array[Object]).arity
 &quot;, @&quot;
 -1
 0
@@ -1038,6 +1053,10 @@ puts m.overloads(System::Array[Object]).arity
 &quot;);
         }
 
+        #endregion
+
+        #region Interfaces
+
         public class ClassWithInterfaces1 : IEnumerable {
             public IEnumerator GetEnumerator() {
                 yield return 1;
@@ -1139,6 +1158,10 @@ false
 &quot;);
         }
 
+        #endregion
+
+        #region Types, Trackers, TypeGroups, TypeHandles, Namespaces
+
         /// &lt;summary&gt;
         /// Type represents a class object - it is equivalent to RubyClass.
         /// &lt;/summary&gt;
@@ -1187,7 +1210,7 @@ nil
 System::Collections
 &quot;);
         }
-        
+
         public void ClrGenerics1() {
             Runtime.LoadAssembly(typeof(Tests).Assembly);
 
@@ -1268,154 +1291,9 @@ p C2::C
 &quot;, OutputFlags.Match);
         }
 
-        /// &lt;summary&gt;
-        /// Require, namespaces.
-        /// &lt;/summary&gt;
-        public void ClrRequireAssembly1() {
-            AssertOutput(delegate() {
-                CompilerTest(@&quot;
-require 'mscorlib'
-puts System::AppDomain.current_domain.friendly_name
-&quot;);
-            }, AppDomain.CurrentDomain.FriendlyName);
-        }
-
-        /// &lt;summary&gt;
-        /// CLR class re-def and inclusions.
-        /// &lt;/summary&gt;
-        public void ClrInclude1() {
-            AssertOutput(delegate() {
-                CompilerTest(@&quot;
-require 'mscorlib'
-include System::Collections
-class ArrayList
-  puts self.object_id == System::Collections::ArrayList.object_id
-end
-&quot;);
-            }, &quot;true&quot;);
-        }
-
-        /// &lt;summary&gt;
-        /// Instantiation.
-        /// &lt;/summary&gt;
-        public void ClrNew1() {
-            AssertOutput(delegate() {
-                CompilerTest(@&quot;
-require 'mscorlib'
-b = System::Text::StringBuilder.new
-b.Append 1
-b.Append '-'
-b.Append true
-puts b.to_string
-puts b.length
-&quot;);
-            }, @&quot;
-1-True
-6
-&quot;);
-        }
+        #endregion
 
-        public void ClrNew2() {
-            TestOutput(@&quot;
-puts c = Thread.clr_ctor
-puts c.overloads(System::Threading::ThreadStart).call(lambda { puts 'hello' }).status
-puts Thread.clr_new(System::Threading::ThreadStart.new(lambda { puts 'hello' })).status
-&quot;, @&quot;
-#&lt;Method: Class(Thread)#.ctor&gt;
-unstarted
-unstarted
-&quot;);
-        }
-
-        /// &lt;summary&gt;
-        /// Alias.
-        /// &lt;/summary&gt;
-        public void ClrAlias1() {
-            AssertOutput(delegate() {
-                CompilerTest(@&quot;
-require 'mscorlib'
-include System::Collections
-
-class ArrayList
-  alias :old_add :Add
-  def foo x
-    old_add x
-  end 
-end
-
-a = ArrayList.new
-a.Add 1
-a.add 2
-a.foo 3
-puts a.count&quot;);
-            }, &quot;3&quot;);
-        }
-
-        public class ClassWithEnum {
-            public enum MyEnum {
-                Foo = 1, Bar = 2, Baz = 3
-            }
-
-            public MyEnum MyProperty { get; set; }
-        }
-
-        public void ClrEnums1() {
-            Context.DefineGlobalVariable(&quot;obj&quot;, new ClassWithEnum());
-            Context.DefineGlobalVariable(&quot;enum&quot;, typeof(ClassWithEnum.MyEnum));
-
-            AssertOutput(delegate() {
-                CompilerTest(@&quot;
-E = $enum.to_class
-
-$obj.my_property = E.foo
-puts $obj.my_property
-
-$obj.my_property = E.bar
-puts $obj.my_property
-&quot;);
-            }, @&quot;
-Foo
-Bar        
-&quot;);
-        }
-
-        [Flags]
-        public enum FlagsInt { A = 1, B = 2 }
-
-        [Flags]
-        public enum FlagsULong : ulong { C = Int64.MaxValue, D = 2 }
-
-        [Flags]
-        public enum FlagsByte : byte { N = 0, E = 4, F = 8 }
-        
-        public void ClrEnums2() {
-            Context.ObjectClass.SetConstant(&quot;A&quot;, FlagsInt.A);
-            Context.ObjectClass.SetConstant(&quot;B&quot;, FlagsInt.B);
-            Context.ObjectClass.SetConstant(&quot;C&quot;, FlagsULong.C);
-            Context.ObjectClass.SetConstant(&quot;D&quot;, FlagsULong.D);
-            Context.ObjectClass.SetConstant(&quot;E&quot;, FlagsByte.E);
-            Context.ObjectClass.SetConstant(&quot;F&quot;, FlagsByte.F);
-
-            AssertOutput(delegate() {
-                CompilerTest(@&quot;
-p(x = A | B, x.class)
-p(x = A | E, x.class) rescue puts $!
-p(x = C ^ D, x.class) 
-p(x = E &amp; F, x.class) 
-p(x = ~C, x.class)
-&quot;);
-            }, @&quot;
-A, B
-*::FlagsInt
-wrong argument type *::FlagsByte (expected *::FlagsInt)
-9223372036854775805
-*::FlagsULong
-N
-*::FlagsByte
-9223372036854775808
-*::FlagsULong
-&quot;, OutputFlags.Match);
-        }
+        #region Delegates, Events
 
         public delegate int Delegate1(string foo, int bar);
 
@@ -1548,6 +1426,10 @@ false
 &quot;);
         }
 
+        #endregion
+
+        #region Virtual method overrides
+
         public class ClassWithVirtuals {
             public virtual string M1() {
                 return &quot;CM1 &quot;;
@@ -1679,6 +1561,42 @@ p E.new.virtual_method
 &quot;);
         }
 
+        #endregion
+
+        #region Constructors
+
+        /// &lt;summary&gt;
+        /// Instantiation.
+        /// &lt;/summary&gt;
+        public void ClrNew1() {
+            AssertOutput(delegate() {
+                CompilerTest(@&quot;
+require 'mscorlib'
+b = System::Text::StringBuilder.new
+b.Append 1
+b.Append '-'
+b.Append true
+puts b.to_string
+puts b.length
+&quot;);
+            }, @&quot;
+1-True
+6
+&quot;);
+        }
+
+        public void ClrNew2() {
+            TestOutput(@&quot;
+puts c = Thread.clr_ctor
+puts c.overload(System::Threading::ThreadStart).call(lambda { puts 'hello' }).status
+puts Thread.clr_new(System::Threading::ThreadStart.new(lambda { puts 'hello' })).status
+&quot;, @&quot;
+#&lt;Method: Class(Thread)#.ctor&gt;
+unstarted
+unstarted
+&quot;);
+        }
+
         public class ClassWithNonEmptyConstructor {
             public int P { get; set; }
 
@@ -1835,6 +1753,10 @@ hello world
 &quot;, OutputFlags.Match);
         }
 
+        #endregion
+
+        #region CLR Primitive Types: Numeric, Arrays, Char, Enums
+
         /// &lt;summary&gt;
         /// TODO: Currently we don't narrow results of arithmetic operations to the self-type even if the value fits.
         /// That might by just fine, but in some scenarios (overload resolution) it might be better to narrow the result type.
@@ -1949,6 +1871,76 @@ true
 &quot;);
         }
 
+        public class ClassWithEnum {
+            public enum MyEnum {
+                Foo = 1, Bar = 2, Baz = 3
+            }
+
+            public MyEnum MyProperty { get; set; }
+        }
+
+        public void ClrEnums1() {
+            Context.DefineGlobalVariable(&quot;obj&quot;, new ClassWithEnum());
+            Context.DefineGlobalVariable(&quot;enum&quot;, typeof(ClassWithEnum.MyEnum));
+
+            AssertOutput(delegate() {
+                CompilerTest(@&quot;
+E = $enum.to_class
+
+$obj.my_property = E.foo
+puts $obj.my_property
+
+$obj.my_property = E.bar
+puts $obj.my_property
+&quot;);
+            }, @&quot;
+Foo
+Bar        
+&quot;);
+        }
+
+        [Flags]
+        public enum FlagsInt { A = 1, B = 2 }
+
+        [Flags]
+        public enum FlagsULong : ulong { C = Int64.MaxValue, D = 2 }
+
+        [Flags]
+        public enum FlagsByte : byte { N = 0, E = 4, F = 8 }
+        
+        public void ClrEnums2() {
+            Context.ObjectClass.SetConstant(&quot;A&quot;, FlagsInt.A);
+            Context.ObjectClass.SetConstant(&quot;B&quot;, FlagsInt.B);
+            Context.ObjectClass.SetConstant(&quot;C&quot;, FlagsULong.C);
+            Context.ObjectClass.SetConstant(&quot;D&quot;, FlagsULong.D);
+            Context.ObjectClass.SetConstant(&quot;E&quot;, FlagsByte.E);
+            Context.ObjectClass.SetConstant(&quot;F&quot;, FlagsByte.F);
+
+            AssertOutput(delegate() {
+                CompilerTest(@&quot;
+p(x = A | B, x.class)
+p(x = A | E, x.class) rescue puts $!
+p(x = C ^ D, x.class) 
+p(x = E &amp; F, x.class) 
+p(x = ~C, x.class)
+&quot;);
+            }, @&quot;
+A, B
+*::FlagsInt
+wrong argument type *::FlagsByte (expected *::FlagsInt)
+9223372036854775805
+*::FlagsULong
+N
+*::FlagsByte
+9223372036854775808
+*::FlagsULong
+&quot;, OutputFlags.Match);
+        }
+
+        #endregion
+
+        #region Operations, Conversions
+
         public void ClrOperators1() {
             AssertOutput(delegate() {
                 CompilerTest(@&quot;
@@ -2165,5 +2157,49 @@ p Inst.delegate(Proc.new { |x| x + 1 }).invoke(123)
 124
 &quot;);
         }
+
+        #endregion
+
+        #region Misc: Inclusions, Aliases
+
+        /// &lt;summary&gt;
+        /// CLR class re-def and inclusions.
+        /// &lt;/summary&gt;
+        public void ClrInclude1() {
+            AssertOutput(delegate() {
+                CompilerTest(@&quot;
+include System::Collections
+class ArrayList
+  puts self.object_id == System::Collections::ArrayList.object_id
+end
+&quot;);
+            }, &quot;true&quot;);
+        }
+
+        /// &lt;summary&gt;
+        /// Alias.
+        /// &lt;/summary&gt;
+        public void ClrAlias1() {
+            AssertOutput(delegate() {
+                CompilerTest(@&quot;
+require 'mscorlib'
+include System::Collections
+
+class ArrayList
+  alias :old_add :Add
+  def foo x
+    old_add x
+  end 
+end
+
+a = ArrayList.new
+a.Add 1
+a.add 2
+a.foo 3
+puts a.count&quot;);
+            }, &quot;3&quot;);
+        }
+
+        #endregion
     }
 }</diff>
      <filename>Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/ClrTests.cs</filename>
    </modified>
    <modified>
      <diff>@@ -74,7 +74,7 @@ namespace IronRuby.Builtins {
             return result;
         }
 
-        internal static RubyMemberInfo/*!*/ GetOverloads(RubyContext/*!*/ context, RubyMemberInfo/*!*/ info, string/*!*/ name, object[]/*!*/ typeArgs) {
+        internal static RubyMemberInfo/*!*/ SelectOverload(RubyContext/*!*/ context, RubyMemberInfo/*!*/ info, string/*!*/ name, object[]/*!*/ typeArgs) {
             RubyMemberInfo result = info.TrySelectOverload(Protocols.ToTypes(context, typeArgs));
             if (result == null) {
                 throw RubyExceptions.CreateArgumentError(String.Format(&quot;no overload of `{0}' matches given parameter types&quot;, name));
@@ -88,8 +88,13 @@ namespace IronRuby.Builtins {
         }
 
         [RubyMethod(&quot;overloads&quot;)]
-        public static RubyMethod/*!*/ GetOverloads(RubyContext/*!*/ context, RubyMethod/*!*/ self, [NotNull]params object[]/*!*/ parameterTypes) {
-            return new RubyMethod(self.Target, GetOverloads(context, self.Info, self.Name, parameterTypes), self.Name);
+        public static RubyMethod/*!*/ SelectOverload_old(RubyContext/*!*/ context, RubyMethod/*!*/ self, [NotNull]params object[]/*!*/ parameterTypes) {
+            throw RubyExceptions.CreateNameError(&quot;Method#overloads is an obsolete name, use Method#overload.&quot;);
+        }
+
+        [RubyMethod(&quot;overload&quot;)]
+        public static RubyMethod/*!*/ SelectOverload(RubyContext/*!*/ context, RubyMethod/*!*/ self, [NotNull]params object[]/*!*/ parameterTypes) {
+            return new RubyMethod(self.Target, SelectOverload(context, self.Info, self.Name, parameterTypes), self.Name);
         }
 
         [RubyMethod(&quot;clr_members&quot;)]</diff>
      <filename>Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/MethodOps.cs</filename>
    </modified>
    <modified>
      <diff>@@ -126,6 +126,31 @@ namespace IronRuby.Builtins {
 
         #endregion
 
+        #region 1.9 Methods
+
+        // =&gt; 
+        // &lt;=&gt;
+        // ==
+        // =~
+        // []
+        // capitalize
+        // casecmp
+        // downcase
+        // empty?
+        // encoding
+        // intern
+        // length
+        // match
+        // next
+        // size
+        // slice
+        // succ
+        // swapcase
+        // to_proc
+        // upcase
+
+        #endregion
+
         #region Public Singleton Methods
 
         [RubyMethod(&quot;all_symbols&quot;, RubyMethodAttributes.PublicSingleton)]</diff>
      <filename>Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/SymbolOps.cs</filename>
    </modified>
    <modified>
      <diff>@@ -118,8 +118,13 @@ namespace IronRuby.Builtins {
         }
 
         [RubyMethod(&quot;overloads&quot;)]
-        public static UnboundMethod/*!*/ GetOverloads(RubyContext/*!*/ context, UnboundMethod/*!*/ self, [NotNull]params object[]/*!*/ parameterTypes) {
-            return new UnboundMethod(self.TargetConstraint, self.Name, MethodOps.GetOverloads(context, self.Info, self.Name, parameterTypes));
+        public static RubyMethod/*!*/ SelectOverload_old(RubyContext/*!*/ context, RubyMethod/*!*/ self, [NotNull]params object[]/*!*/ parameterTypes) {
+            throw RubyExceptions.CreateNameError(&quot;UnboundMethod#overloads is an obsolete name, use UnboundMethod#overload.&quot;);
+        }
+        
+        [RubyMethod(&quot;overload&quot;)]
+        public static UnboundMethod/*!*/ SelectOverload(RubyContext/*!*/ context, UnboundMethod/*!*/ self, [NotNull]params object[]/*!*/ parameterTypes) {
+            return new UnboundMethod(self.TargetConstraint, self.Name, MethodOps.SelectOverload(context, self.Info, self.Name, parameterTypes));
         }
 
         [RubyMethod(&quot;clr_members&quot;)]</diff>
      <filename>Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/UnboundMethod.cs</filename>
    </modified>
    <modified>
      <diff>@@ -53,12 +53,32 @@ namespace IronRuby.Builtins {
             return SymbolTable.StringToId(self.MangledName);
         }
 
+        [RubyMethod(&quot;==&quot;)]
+        public static bool IsEqual(ClrName/*!*/ self, [DefaultProtocol, NotNull]string/*!*/ other) {
+            return self.MangledName == other;
+        }
+
+        [RubyMethod(&quot;==&quot;)]
+        public static bool IsEqual(ClrName/*!*/ self, [NotNull]MutableString/*!*/ other) {
+            return self.MangledName == other.ConvertToString();
+        }
+
+        [RubyMethod(&quot;==&quot;)]
+        public static bool IsEqual(ClrName/*!*/ self, [NotNull]ClrName/*!*/ other) {
+            return self.Equals(other);
+        }
+
         [RubyMethod(&quot;&lt;=&gt;&quot;)]
-        public static int Compare(ClrName/*!*/ self, [NotNull]string/*!*/ other) {
+        public static int Compare(ClrName/*!*/ self, [DefaultProtocol, NotNull]string/*!*/ other) {
             return Math.Sign(self.MangledName.CompareTo(other));
         }
 
         [RubyMethod(&quot;&lt;=&gt;&quot;)]
+        public static int Compare(ClrName/*!*/ self, [NotNull]ClrName/*!*/ other) {
+            return self.MangledName.CompareTo(other.MangledName);
+        }
+
+        [RubyMethod(&quot;&lt;=&gt;&quot;)]
         public static int Compare(ClrName/*!*/ self, [NotNull]MutableString/*!*/ other) {
             // TODO: do not create MS
             return -Math.Sign(other.CompareTo(MutableString.Create(self.MangledName, RubyEncoding.UTF8)));</diff>
      <filename>Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/ClrNameOps.cs</filename>
    </modified>
    <modified>
      <diff>@@ -2382,10 +2382,17 @@ namespace IronRuby.Builtins {
         private static void LoadIronRuby__Clr__Name_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
             module.DefineLibraryMethod(&quot;&lt;=&gt;&quot;, 0x51, 
                 new System.Func&lt;IronRuby.Runtime.ClrName, System.String, System.Int32&gt;(IronRuby.Builtins.ClrNameOps.Compare), 
+                new System.Func&lt;IronRuby.Runtime.ClrName, IronRuby.Runtime.ClrName, System.Int32&gt;(IronRuby.Builtins.ClrNameOps.Compare), 
                 new System.Func&lt;IronRuby.Runtime.ClrName, IronRuby.Builtins.MutableString, System.Int32&gt;(IronRuby.Builtins.ClrNameOps.Compare), 
                 new System.Func&lt;IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.RespondToStorage, IronRuby.Runtime.ClrName, System.Object, System.Object&gt;(IronRuby.Builtins.ClrNameOps.Compare)
             );
             
+            module.DefineLibraryMethod(&quot;==&quot;, 0x51, 
+                new System.Func&lt;IronRuby.Runtime.ClrName, System.String, System.Boolean&gt;(IronRuby.Builtins.ClrNameOps.IsEqual), 
+                new System.Func&lt;IronRuby.Runtime.ClrName, IronRuby.Builtins.MutableString, System.Boolean&gt;(IronRuby.Builtins.ClrNameOps.IsEqual), 
+                new System.Func&lt;IronRuby.Runtime.ClrName, IronRuby.Runtime.ClrName, System.Boolean&gt;(IronRuby.Builtins.ClrNameOps.IsEqual)
+            );
+            
             module.DefineLibraryMethod(&quot;clr_name&quot;, 0x51, 
                 new System.Func&lt;IronRuby.Runtime.ClrName, IronRuby.Builtins.MutableString&gt;(IronRuby.Builtins.ClrNameOps.GetClrName)
             );
@@ -3490,8 +3497,12 @@ namespace IronRuby.Builtins {
                 new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubyMethod, System.Object[], IronRuby.Builtins.RubyMethod&gt;(IronRuby.Builtins.MethodOps.BindGenericParameters)
             );
             
+            module.DefineLibraryMethod(&quot;overload&quot;, 0x51, 
+                new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubyMethod, System.Object[], IronRuby.Builtins.RubyMethod&gt;(IronRuby.Builtins.MethodOps.SelectOverload)
+            );
+            
             module.DefineLibraryMethod(&quot;overloads&quot;, 0x51, 
-                new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubyMethod, System.Object[], IronRuby.Builtins.RubyMethod&gt;(IronRuby.Builtins.MethodOps.GetOverloads)
+                new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubyMethod, System.Object[], IronRuby.Builtins.RubyMethod&gt;(IronRuby.Builtins.MethodOps.SelectOverload_old)
             );
             
             module.DefineLibraryMethod(&quot;to_proc&quot;, 0x51, 
@@ -5988,8 +5999,12 @@ namespace IronRuby.Builtins {
                 new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.UnboundMethod, System.Object[], IronRuby.Builtins.UnboundMethod&gt;(IronRuby.Builtins.UnboundMethod.BingGenericParameters)
             );
             
+            module.DefineLibraryMethod(&quot;overload&quot;, 0x51, 
+                new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.UnboundMethod, System.Object[], IronRuby.Builtins.UnboundMethod&gt;(IronRuby.Builtins.UnboundMethod.SelectOverload)
+            );
+            
             module.DefineLibraryMethod(&quot;overloads&quot;, 0x51, 
-                new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.UnboundMethod, System.Object[], IronRuby.Builtins.UnboundMethod&gt;(IronRuby.Builtins.UnboundMethod.GetOverloads)
+                new System.Func&lt;IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubyMethod, System.Object[], IronRuby.Builtins.RubyMethod&gt;(IronRuby.Builtins.UnboundMethod.SelectOverload_old)
             );
             
             module.DefineLibraryMethod(&quot;to_s&quot;, 0x51, </diff>
      <filename>Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ namespace IronRuby.Runtime {
     /// &lt;summary&gt;
     /// Represents a CLR member name that is subject to name mangling.
     /// &lt;/summary&gt;
-    public class ClrName {
+    public class ClrName : IEquatable&lt;ClrName&gt; {
         private readonly string/*!*/ _actual;
         private string _mangled;
 
@@ -45,5 +45,17 @@ namespace IronRuby.Runtime {
             ContractUtils.RequiresNotNull(actualName, &quot;actualName&quot;);
             _actual = actualName;
         }
+
+        public bool Equals(ClrName other) {
+            return other != null &amp;&amp; _actual == other._actual;
+        }
+
+        public override bool Equals(object obj) {
+            return Equals(obj as ClrName);
+        }
+
+        public override int GetHashCode() {
+            return _actual.GetHashCode();
+        }
     }
 }
\ No newline at end of file</diff>
      <filename>Merlin/Main/Languages/Ruby/Ruby/Runtime/ClrName.cs</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 # to do:
 #   * support &quot;smart&quot; compare
 
-require &quot;../common&quot;
+require  File.dirname(__FILE__) + &quot;/../common&quot;
 begin
     require 'fileutils'
 rescue LoadError =&gt; e
@@ -93,13 +93,13 @@ def run_one_test(f)
     if File.exist?(baseline)
         FileUtils.cp(baseline,clog)
         printf &quot; S&quot;
-    elsif CRubyDriver.run(f, clog) != 0
+    elsif CRubyDriver.run(File.expand_path(f, File.dirname(__FILE__)), clog) != 0
         log_error(&quot;failed while running CRuby\n&quot;)
         return  
     end
 
     $applicable_drivers.each do |d|    
-        if d.run(f, ilog) != 0
+        if d.run(File.expand_path(f, File.dirname(__FILE__)), ilog) != 0
             log_error(&quot;failed while running #{d}\n&quot;)
         end
         </diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Compat/run_compat.rb</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Interop/net/A/a.generated.dll</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Interop/net/B/b.generated.dll</filename>
    </modified>
    <modified>
      <diff>@@ -755,13 +755,13 @@ public abstract partial class AbstractClassWithMethods {
       public abstract string PublicMethod();
       protected abstract string ProtectedMethod();
     }
-#line 88 &quot;./method/reflection_spec.rb&quot;
+#line 87 &quot;./method/reflection_spec.rb&quot;
 public partial class ClassWithOverloads {
       public string Overloaded() { return &quot;empty&quot;; }
       public string Overloaded(int arg) { return &quot;one arg&quot;; }
       public string Overloaded(int arg1, int arg2) { return &quot;two args&quot;; }
     }
-#line 128 &quot;./method/reflection_spec.rb&quot;
+#line 127 &quot;./method/reflection_spec.rb&quot;
 public partial class Klass{
       public static int StaticVoidMethod() {
         return 1;</diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Interop/net/fixtures.generated.cs</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Interop/net/fixtures.generated.dll</filename>
    </modified>
    <modified>
      <diff>@@ -41,12 +41,12 @@ describe &quot;Selecting .NET overloads&quot; do
   end
   
   it &quot;is allowed&quot; do
-    @methods.overloads(Fixnum,Fixnum).call(100,100).should equal_clr_string(&quot;two args&quot;)
+    @methods.overload(Fixnum,Fixnum).call(100,100).should equal_clr_string(&quot;two args&quot;)
   end
 
   it &quot;correctly reports error message&quot; do
     #regression test for RubyForge 24112
-    lambda {@methods.overloads(Fixnum).call}.should raise_error(ArgumentError, /0 for 1/)
+    lambda {@methods.overload(Fixnum).call}.should raise_error(ArgumentError, /0 for 1/)
   end
 end
 </diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Interop/net/method/invocation/overload_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ flags.each do |flag|
   cmd = &quot;IronRuby.Tests.exe #{flag}&quot;
   banner cmd
   Dir.chdir(ENV['ROWAN_BIN']) do
-    system cmd
+    exit 1 unless system cmd
   end
 end
 </diff>
      <filename>Merlin/Main/Languages/Ruby/Tests/Scripts/irtest.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,14 @@ using Microsoft.Contracts;
 using Microsoft.Scripting.Utils;
 
 namespace Microsoft.Scripting {
+    /// &lt;summary&gt;
+    /// Provides an interned representation of a string which supports both case sensitive and case insensitive
+    /// lookups.
+    /// 
+    /// By default all lookups are case sensitive.  Case insensitive lookups can be performed by first creating
+    /// a normal SymbolId for a given string and then accessing the CaseInsensitiveIdentifier property.  Using
+    /// the case insensitive identifier during a lookup will cause the lookup to be case insensitive.
+    /// &lt;/summary&gt;
     [Serializable]
     public struct SymbolId : ISerializable, IComparable, IComparable&lt;SymbolId&gt;, IEquatable&lt;SymbolId&gt; {
         private readonly int _id;
@@ -37,39 +45,39 @@ namespace Microsoft.Scripting {
         }
 
         public SymbolId CaseInsensitiveIdentifier {
-            get { return new SymbolId(_id &amp; 0x00FFFFFF); }
+            get { return new SymbolId(_id &amp; ~SymbolTable.CaseVersionMask); }
         }
 
         public int CaseInsensitiveId {
-            get { return _id &amp; 0x00FFFFFF; }
+            get { return _id &amp; ~SymbolTable.CaseVersionMask; }
+        }
+
+        public bool IsCaseInsensitive {
+            get {
+                return (_id &amp; SymbolTable.CaseVersionMask) == 0;
+            }
         }
 
         [Confined]
         public override bool Equals(object obj) {
             if (!(obj is SymbolId)) return false;
-            SymbolId other = (SymbolId)obj;
-            return _id == other._id;
+            return Equals((SymbolId)obj);
         }
 
         [StateIndependent]
         public bool Equals(SymbolId other) {
-            return _id == other._id;
-        }
 
-        [Confined]
-        public bool CaseInsensitiveEquals(SymbolId other) {
-            return (_id &amp; 0x00FFFFFF) == (other._id &amp; 0x00FFFFFF);
+            if (_id == other._id) {
+                return true;
+            } else if (IsCaseInsensitive || other.IsCaseInsensitive) {
+                return (_id &amp; ~SymbolTable.CaseVersionMask) == (other._id &amp; ~SymbolTable.CaseVersionMask);
+            }
+            return false;
         }
 
         [Confined]
         public override int GetHashCode() {
-            return _id;
-        }
-
-        [System.Diagnostics.CodeAnalysis.SuppressMessage(&quot;Microsoft.Design&quot;, &quot;CA1024:UsePropertiesWhereAppropriate&quot;)]
-        [Confined]
-        public int GetCaseInsensitiveHashCode() {
-            return (_id &amp; 0x00FFFFFF);
+            return _id &amp; ~SymbolTable.CaseVersionMask;
         }
 
         /// &lt;summary&gt;
@@ -87,19 +95,11 @@ namespace Microsoft.Scripting {
         }
 
         public static bool operator ==(SymbolId a, SymbolId b) {
-            return a._id == b._id;
+            return a.Equals(b);
         }
 
         public static bool operator !=(SymbolId a, SymbolId b) {
-            return a._id != b._id;
-        }
-
-        public static bool operator &lt;(SymbolId a, SymbolId b) {
-            return a._id &lt; b._id;
-        }
-
-        public static bool operator &gt;(SymbolId a, SymbolId b) {
-            return a._id &gt; b._id;
+            return !a.Equals(b);
         }
 
         #region IComparable Members</diff>
      <filename>Merlin/Main/Runtime/Microsoft.Scripting/SymbolId.cs</filename>
    </modified>
    <modified>
      <diff>@@ -16,92 +16,97 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using Microsoft.Scripting.Utils;
+using System;
 
 namespace Microsoft.Scripting {
+    /// &lt;summary&gt;
+    /// Provides a common table of all SymbolId's in the system.
+    /// 
+    /// Implementation details:
+    /// 
+    /// The case insensitive lookups are implemented by using the top 8 bits for
+    /// storing information about multiple casings.  These bits are zero for a case insensitive
+    /// identifier or specify the casing version for case sensitive lookups.  Because of this
+    /// there can be at most 255 variations of casing for each identifier.
+    /// 
+    /// Two dictionaries are used to track both the case sensitive and case insensitive versions.
+    /// 
+    /// For the case insensitive versions this is just a normal dictionary keyed from string to
+    /// the ID for that specific version.  For the case sensitive version a case insensitive
+    /// dictionary is used.  The value in this case is the last case insensitive version that
+    /// we handed out.
+    /// 
+    /// When we hand out an ID we first do a lookup in the normal dictionary.  If this succeeds
+    /// then we have the ID and we're done.  If this fails we then need to consult the case
+    /// insensitive dictionary.  If the entry exists there then we just need to bump the invariant
+    /// version, store that back into the invariant dictionary, and then update the normal dictionary
+    /// with the newly produced version.  If teh entry wasn't in the case insensitive dictionary
+    /// then we need to create a new entry in both tables.
+    /// &lt;/summary&gt;
     public static class SymbolTable {
         private static readonly object _lockObj = new object();
 
         private static readonly Dictionary&lt;string, int&gt; _idDict = new Dictionary&lt;string, int&gt;(InitialTableSize);
+        private static readonly Dictionary&lt;string, int&gt; _invariantDict = new Dictionary&lt;string, int&gt;(InitialTableSize, StringComparer.InvariantCultureIgnoreCase);
 
         private const int InitialTableSize = 256;
         private static readonly Dictionary&lt;int, string&gt; _fieldDict = CreateFieldDictionary();
         [MultiRuntimeAware]
         private static int _nextCaseInsensitiveId = 1;
 
+        internal const int CaseVersionMask = unchecked((int)0xFF000000);
+        internal const int CaseVersionIncrement = 0x01000000;
+
         private static Dictionary&lt;int, string&gt;  CreateFieldDictionary() {
             Dictionary&lt;int, string&gt; result = new Dictionary&lt;int, string&gt;(InitialTableSize);
             result[0] = null;   // initialize the null string
             return result;
         }
 
-        public static SymbolId StringToId(string field) {
-            ContractUtils.RequiresNotNull(field, &quot;field&quot;);
+        public static SymbolId StringToId(string value) {
+            ContractUtils.RequiresNotNull(value, &quot;value&quot;);
 
             int res;
             lock (_lockObj) {
                 // First, look up the identifier case-sensitively.
-                if (!_idDict.TryGetValue(field, out res)) {
-                    string invariantField = field.ToUpper(System.Globalization.CultureInfo.InvariantCulture);
-
+                if (!_idDict.TryGetValue(value, out res)) {
                     // OK, didn't find it, so let's look up the case-insensitive
                     // identifier.
-                    if (_idDict.TryGetValue(invariantField, out res)) {
-                        // OK, this is a new casing of an existing identifier.
-                        Debug.Assert(res &lt; 0, &quot;Must have invariant bit set!&quot;);
-
-                        // Throw if we've exhausted the number of casings.
-                        if (unchecked(((uint)res &amp; 0x00FFFFFF) == 0x00FFFFFF)) {
-                            throw Error.CantAddCasing(field);
-                        }
-
-                        int invariantRes = res + 0x01000000;
-
-                        // Mask off the high bit.
-                        res = unchecked((int)((uint)res &amp; 0x7FFFFFFF));
-
-                        _idDict[field] = res;
-                        _idDict[invariantField] = invariantRes;
-                        _fieldDict[res] = field;
-                    } else {
+                    if (!_invariantDict.TryGetValue(value, out res)) {
                         // This is a whole new identifier.
-
-                        if (_nextCaseInsensitiveId == int.MaxValue) {
-                            throw Error.CantAddIdentifier(field);
+                        if (_nextCaseInsensitiveId == ~CaseVersionMask) {
+                            throw Error.CantAddIdentifier(value);
                         }
 
-                        // register new id...
-                        res = _nextCaseInsensitiveId++;
-                        // Console.WriteLine(&quot;Registering {0} as {1}&quot;, field, res);
-
-                        _fieldDict[res] = invariantField;
-
-                        if (field != invariantField) {
-                            res |= 0x01000000;
-                            _idDict[field] = res;
-                            _fieldDict[res] = field;
+                        // allocate new ID at case version 1.
+                        res = _nextCaseInsensitiveId++ | CaseVersionIncrement;
+                    } else {
+                        // OK, this is a new casing of an existing identifier.
+                        // Throw if we've exhausted the number of casings.
+                        if (unchecked(((uint)res &amp; CaseVersionMask) == CaseVersionMask)) {
+                            throw Error.CantAddCasing(value);
                         }
 
-                        _idDict[invariantField] = unchecked((int)(((uint)res | 0x80000000) + 0x01000000));
-                    }
-                } else {
-                    // If this happens to be the invariant field, then we need to
-                    // mask off the top byte, since that's just used to pick the next
-                    // id for this identifier.
-                    if (res &lt; 0) {
-                        res &amp;= 0x00FFFFFF;
+                        // bump the case version
+                        res += CaseVersionIncrement;
                     }
+
+                    // update the tables with the IDs
+                    _invariantDict[value] = res;
+                    _idDict[value] = res;
+                    _fieldDict[res] = value;
                 }
             }
             return new SymbolId(res);
         }
 
-        public static SymbolId StringToCaseInsensitiveId(string field) {
-            return StringToId(field.ToUpper(System.Globalization.CultureInfo.InvariantCulture));
+        public static SymbolId StringToCaseInsensitiveId(string value) {
+            return StringToId(value).CaseInsensitiveIdentifier;
         }
 
-        public static SymbolId[] QualifiedStringToIds(string fields) {
-            if (fields != null) {
-                string[] strings = fields.Split('.');
+        public static SymbolId[] QualifiedStringToIds(string values) {
+            if (values != null) {
+                string[] strings = values.Split('.');
                 SymbolId[] identifiers = new SymbolId[strings.Length];
 
                 for (int i = 0; i &lt; strings.Length; i++) {
@@ -115,12 +120,22 @@ namespace Microsoft.Scripting {
         }
 
         public static string IdToString(SymbolId id) {
-            return _fieldDict[id.Id];
+            lock (_fieldDict) {
+                if (id.IsCaseInsensitive) {
+                    return _fieldDict[id.Id | CaseVersionIncrement];
+                }
+                return _fieldDict[id.Id];
+            }
         }
 
         // Tries to lookup the SymbolId to see if it is valid
         public static bool ContainsId(SymbolId id) {
-            return _fieldDict.ContainsKey(id.Id);
+            lock (_fieldDict) {
+                if (id.IsCaseInsensitive) {
+                    return _fieldDict.ContainsKey(id.Id | CaseVersionIncrement);
+                }
+                return _fieldDict.ContainsKey(id.Id);
+            }
         }
 
         public static string[] IdsToStrings(IList&lt;SymbolId&gt; ids) {
@@ -132,11 +147,11 @@ namespace Microsoft.Scripting {
             return ret;
         }
 
-        public static SymbolId[] StringsToIds(IList&lt;string&gt; strings) {
-            SymbolId[] ret = new SymbolId[strings.Count];
-            for (int i = 0; i &lt; strings.Count; i++) {
-                if (strings[i] == null) ret[i] = SymbolId.Empty;
-                else ret[i] = StringToId(strings[i]);
+        public static SymbolId[] StringsToIds(IList&lt;string&gt; values) {
+            SymbolId[] ret = new SymbolId[values.Count];
+            for (int i = 0; i &lt; values.Count; i++) {
+                if (values[i] == null) ret[i] = SymbolId.Empty;
+                else ret[i] = StringToId(values[i]);
             }
             return ret;
         }</diff>
      <filename>Merlin/Main/Runtime/Microsoft.Scripting/SymbolTable.cs</filename>
    </modified>
    <modified>
      <diff>@@ -85,7 +85,13 @@ namespace System.Dynamic {
 
                 bool[] isByRef = ComBinderHelpers.ProcessArgumentsForCom(ref indexes);
                 isByRef = isByRef.AddLast(false);
-                return BindComInvoke(method, indexes.AddLast(value), binder.CallInfo, isByRef);
+                var result = BindComInvoke(method, indexes.AddLast(value), binder.CallInfo, isByRef);
+
+                // Make sure to return the value; some languages need it.
+                return new DynamicMetaObject(
+                    Expression.Block(result.Expression, Expression.Convert(value.Expression, typeof(object))),
+                    result.Restrictions
+                );
             }
 
             return base.BindSetIndex(binder, indexes, value);</diff>
      <filename>ndp/fx/src/Dynamic/System/Dynamic/DispCallableMetaObject.cs</filename>
    </modified>
    <modified>
      <diff>@@ -159,7 +159,13 @@ namespace System.Dynamic {
                 bool[] isByRef = ComBinderHelpers.ProcessArgumentsForCom(ref indexes);
                 isByRef = isByRef.AddLast(false);
 
-                return BindComInvoke(indexes.AddLast(value), setItem, binder.CallInfo, isByRef);
+                var result = BindComInvoke(indexes.AddLast(value), setItem, binder.CallInfo, isByRef);
+
+                // Make sure to return the value; some languages need it.
+                return new DynamicMetaObject(
+                    Expression.Block(result.Expression, Expression.Convert(value.Expression, typeof(object))),
+                    result.Restrictions
+                );
             }
 
             return base.BindSetIndex(binder, indexes, value);
@@ -201,12 +207,7 @@ namespace System.Dynamic {
                     method
                 ).Invoke();
 
-                // This condition is guarenteed because we wraped the COM
-                // object and deferred to get here. It's nice because it allows
-                // us to evaluate the &quot;value&quot; expression twice.
-                Debug.Assert(value.Expression is ParameterExpression);
-
-                // Make sure to return the value; some languages that need it.
+                // Make sure to return the value; some languages need it.
                 return new DynamicMetaObject(
                     Expression.Block(result.Expression, Expression.Convert(value.Expression, typeof(object))),
                     result.Restrictions</diff>
      <filename>ndp/fx/src/Dynamic/System/Dynamic/IDispatchMetaObject.cs</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>40b298b6926cee3ce45d63573ccbf2967a5655e6</id>
    </parent>
  </parents>
  <author>
    <name>Jim Deville</name>
    <email>jdeville@microsoft.com</email>
  </author>
  <url>http://github.com/jredville/ironruby/commit/4f2e60f48dab0c16c89f4b72d822d5450fe201cd</url>
  <id>4f2e60f48dab0c16c89f4b72d822d5450fe201cd</id>
  <committed-date>2009-06-17T14:18:26-07:00</committed-date>
  <authored-date>2009-06-17T14:18:26-07:00</authored-date>
  <message>syncing to head of tfs</message>
  <tree>40ab0273fdd9664307d675e65a764ba8ddab8d25</tree>
  <committer>
    <name>Jim Deville</name>
    <email>jdeville@microsoft.com</email>
  </committer>
</commit>
