edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Enumerable.cs;C922537
File: Enumerable.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Enumerable.cs;C922537  (server)    6/25/2009 1:56 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Enumerable.cs;FuncDelegates
@@ -48,7 +48,7 @@
 
         private static object TrueForItems(CallSiteStorage<EachSite>/*!*/ each, BlockParam predicate, object self, bool expected) {
             bool result = expected;
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (predicate != null) {
                     if (predicate.Yield(item, out item)) {
                         return item;
@@ -75,7 +75,7 @@
         [RubyMethod("map")]
         public static RubyArray Map(CallSiteStorage<EachSite>/*!*/ each, BlockParam collector, object self) {
             RubyArray result = new RubyArray();
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (collector != null) {
                     if (collector.Yield(item, out item)) {
                         return item;
@@ -97,7 +97,7 @@
             BlockParam predicate, object self, [Optional]object ifNone) {
             object result = Missing.Value;
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (predicate == null) {
                     throw RubyExceptions.NoBlockGiven();
                 }
@@ -140,7 +140,7 @@
 
             int index = 0;
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 object blockResult;
                 if (block.Yield(item, index, out blockResult)) {
                     return blockResult;
@@ -161,7 +161,7 @@
         public static RubyArray/*!*/ ToArray(CallSiteStorage<EachSite>/*!*/ each, object self) {
             RubyArray data = new RubyArray();
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 data.Add(item);
                 return null;
             }));
@@ -187,7 +187,7 @@
         private static RubyArray/*!*/ Filter(CallSiteStorage<EachSite>/*!*/ each, BlockParam predicate, object self, bool acceptingValue) {
             RubyArray result = new RubyArray();
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (predicate == null) {
                     throw RubyExceptions.NoBlockGiven();
                 }
@@ -218,7 +218,7 @@
             RubyArray result = new RubyArray();
             var site = caseEquals.GetCallSite("===");
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (RubyOps.IsTrue(site.Target(site, pattern, item))) {
                     if (action != null) {
                         if (action.Yield(item, out item)) {
@@ -242,7 +242,7 @@
         public static bool Contains(CallSiteStorage<EachSite>/*!*/ each, BinaryOpStorage/*!*/ equals, object self, object value) {
             bool result = false;
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (Protocols.IsEqual(equals, item, value)) {
                     result = true;
                     return selfBlock.Break(result);
@@ -261,7 +261,7 @@
         public static object Inject(CallSiteStorage<EachSite>/*!*/ each, BlockParam operation, object self, [Optional]object initial) {
 
             object result = initial;
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (result == Missing.Value) {
                     result = item;
                     return null;
@@ -315,7 +315,7 @@
             bool firstItem = true;
             object result = null;
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 // Check for first element
                 if (firstItem) {
                     result = item;
@@ -357,7 +357,7 @@
             RubyArray trueSet = new RubyArray();
             RubyArray falseSet = new RubyArray();
 
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (predicate == null) {
                     throw RubyExceptions.NoBlockGiven();
                 }
@@ -409,7 +409,7 @@
             List<KeyValuePair<object, object>> keyValuePairs = new List<KeyValuePair<object, object>>();
 
             // Collect the key, value pairs
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 if (keySelector == null) {
                     throw RubyExceptions.NoBlockGiven();
                 }
@@ -453,7 +453,7 @@
             }
 
             int index = 0;
-            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object item) {
+            Each(each, self, Proc.Create(each.Context, delegate(BlockParam/*!*/ selfBlock, object _, object item) {
                 // Collect items
                 RubyArray array = new RubyArray(otherArrays.Length + 1);
                 array.Add(item);
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;C940713
File: Proc.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;C940713  (server)    6/25/2009 1:37 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;FuncDelegates
@@ -29,6 +29,12 @@
 using AstUtils = Microsoft.Scripting.Ast.Utils;
 
 namespace IronRuby.Builtins {
+    using BlockCallTarget0 = Func<BlockParam, object, object>;
+    using BlockCallTarget1 = Func<BlockParam, object, object, object>;
+    using BlockCallTarget2 = Func<BlockParam, object, object, object, object>;
+    using BlockCallTarget3 = Func<BlockParam, object, object, object, object, object>;
+    using BlockCallTarget4 = Func<BlockParam, object, object, object, object, object, object>;
+    using BlockCallTargetN = Func<BlockParam, object, object[], object>;
 
     public enum ProcKind {
         Block,
@@ -269,40 +275,25 @@
 
         #region Block helper methods
 
-        public static Proc/*!*/ Create(RubyContext/*!*/ context, Func<BlockParam, object, object>/*!*/ clrMethod) {
-            return Create(context, (BlockCallTarget1)BlockCallback1, clrMethod, 1);
+        public static Proc/*!*/ Create(RubyContext/*!*/ context, BlockCallTarget1/*!*/ clrMethod) {
+            return Create(context, clrMethod, 1);
         }
 
-        public static Proc/*!*/ Create(RubyContext/*!*/ context, Func<BlockParam, object, object, object>/*!*/ clrMethod) {
-            return Create(context, (BlockCallTarget2)BlockCallback2, clrMethod, 2);
+        public static Proc/*!*/ Create(RubyContext/*!*/ context, BlockCallTarget2/*!*/ clrMethod) {
+            return Create(context, clrMethod, 2);
         }
 
-        public static Proc/*!*/ Create(RubyContext/*!*/ context, Func<BlockParam, object, object, object, object>/*!*/ clrMethod) {
-            return Create(context, (BlockCallTarget3)BlockCallback3, clrMethod, 3);
+        public static Proc/*!*/ Create(RubyContext/*!*/ context, BlockCallTarget3/*!*/ clrMethod) {
+            return Create(context, clrMethod, 3);
         }
 
-        public static Proc/*!*/ Create(RubyContext/*!*/ context, Delegate/*!*/ clrMethod, object self, int parameterCount) {
+        public static Proc/*!*/ Create(RubyContext/*!*/ context, Delegate/*!*/ clrMethod, int parameterCount) {
             // scope is used to get to the execution context:
-            return new Proc(ProcKind.Block, self, context.EmptyScope, null, 0, BlockDispatcher.Create(clrMethod, parameterCount, BlockSignatureAttributes.None));
+            return new Proc(ProcKind.Block, null, context.EmptyScope, null, 0, 
+                BlockDispatcher.Create(clrMethod, parameterCount, BlockSignatureAttributes.None)
+            );
         }
 
-        // The following methods are block implementations, therefore they need to have signature like a block.
-        // We need to get to the real delegate to call. We capture it into the self object.
-        public static object BlockCallback1(BlockParam/*!*/ block, object self, object arg0) {
-            var clrMethod = (Func<BlockParam, object, object>)self;
-            return clrMethod(block, arg0);
-        }
-
-        public static object BlockCallback2(BlockParam/*!*/ block, object self, object arg0, object arg1) {
-            var clrMethod = (Func<BlockParam, object, object, object>)self;
-            return clrMethod(block, arg0, arg1);
-        }
-
-        public static object BlockCallback3(BlockParam/*!*/ block, object self, object arg0, object arg1, object arg2) {
-            var clrMethod = (Func<BlockParam, object, object, object, object>)self;
-            return clrMethod(block, arg0, arg1, arg2);
-        }
-
         #endregion
     }
 }
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyMethod.cs;C931319
File: RubyMethod.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyMethod.cs;C931319  (server)    6/25/2009 2:03 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyMethod.cs;FuncDelegates
@@ -23,6 +23,8 @@
 using AstUtils = Microsoft.Scripting.Ast.Utils;
 
 namespace IronRuby.Builtins {
+    using BlockCallTargetUnsplatN = Func<BlockParam, object, object[], RubyArray, object>;
+
     public partial class RubyMethod {
         private readonly object _target;
         private readonly string/*!*/ _name;
===================================================================
