edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/OverloadResolutionTests.cs;C931319
File: OverloadResolutionTests.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/OverloadResolutionTests.cs;C931319  (server)    7/9/2009 5:03 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/OverloadResolutionTests.cs;BlockDelegates
@@ -24,6 +24,8 @@
 using Ast = System.Linq.Expressions.Expression;
 
 namespace IronRuby.Tests {
+    using BlockCallTarget0 = Func<BlockParam, object, object>;
+
     public partial class Tests {
 
         private static DynamicMetaObject/*!*/ MO(object value) {
@@ -56,7 +58,8 @@
 
         public void OverloadResolution_Block1() {
             var scope = Context.EmptyScope;
-            var proc = new Proc(ProcKind.Proc, null, scope, null, 0, new BlockDispatcher0((x, y) => null, BlockSignatureAttributes.None));
+            var proc = new Proc(ProcKind.Proc, null, scope, new BlockDispatcher0(BlockSignatureAttributes.None, null, 0).
+                SetMethod(new BlockCallTarget0((x, y) => null)));
 
             var arguments = new[] {
                 // 1.times
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;C972310
File: Proc.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;C972310  (server)    7/9/2009 4:39 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;BlockDelegates
@@ -50,10 +50,6 @@
         // The scope that defines this block.
         private readonly RubyScope/*!*/ _scope;
 
-        // position of the block definition (opening brace):
-        private readonly string _sourcePath;
-        private readonly int _sourceLine;
-
         private readonly BlockDispatcher/*!*/ _dispatcher;
         private ProcKind _kind;
 
@@ -79,11 +75,11 @@
         }
 
         public string SourcePath {
-            get { return _sourcePath; }
+            get { return _dispatcher.SourcePath; }
         }
 
         public int SourceLine {
-            get { return _sourceLine; }
+            get { return _dispatcher.SourceLine; }
         }
 
         internal RuntimeFlowControl/*!*/ GetOwner() {
@@ -97,18 +93,17 @@
 
         #region Construction, Conversion
 
-        internal Proc(ProcKind kind, object self, RubyScope/*!*/ scope, string sourcePath, int sourceLine, BlockDispatcher/*!*/ dispatcher) {
+        internal Proc(ProcKind kind, object self, RubyScope/*!*/ scope, BlockDispatcher/*!*/ dispatcher) {
             Assert.NotNull(scope, dispatcher);
+            Debug.Assert(dispatcher.Method != null);
             _kind = kind;
             _self = self;
             _scope = scope;
             _dispatcher = dispatcher;
-            _sourcePath = sourcePath;
-            _sourceLine = sourceLine;
         }
 
         protected Proc(Proc/*!*/ proc)
-            : this(proc.Kind, proc.Self, proc.LocalScope, proc.SourcePath, proc.SourceLine, proc.Dispatcher) {
+            : this(proc.Kind, proc.Self, proc.LocalScope, proc.Dispatcher) {
             Converter = proc.Converter;
         }
 
@@ -294,8 +289,8 @@
 
         public static Proc/*!*/ Create(RubyContext/*!*/ context, Delegate/*!*/ clrMethod, int parameterCount) {
             // scope is used to get to the execution context:
-            return new Proc(ProcKind.Block, null, context.EmptyScope, null, 0, 
-                BlockDispatcher.Create(clrMethod, parameterCount, BlockSignatureAttributes.None)
+            return new Proc(ProcKind.Block, null, context.EmptyScope,
+                BlockDispatcher.Create(parameterCount, BlockSignatureAttributes.None, null, 0).SetMethod(clrMethod)
             );
         }
 
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyMethod.cs;C963943
File: RubyMethod.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyMethod.cs;C963943  (server)    7/9/2009 4:57 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyMethod.cs;BlockDelegates
@@ -75,14 +75,17 @@
                     return site.Target(site, this, unsplat);
                 });
 
-                _procDispatcher = new BlockDispatcherUnsplatN(block, 0, 
-                    BlockDispatcher.MakeAttributes(BlockSignatureAttributes.HasUnsplatParameter, _info.GetArity())
+                _procDispatcher = new BlockDispatcherUnsplatN(0, 
+                    BlockDispatcher.MakeAttributes(BlockSignatureAttributes.HasUnsplatParameter, _info.GetArity()),
+                    null, 0
                 );
+
+                _procDispatcher.SetMethod(block);
             }
 
             // TODO: 
             // MRI: source file/line are that of the to_proc method call:
-            return new Proc(ProcKind.Block, scope.SelfObject, scope, null, 0, _procDispatcher);
+            return new Proc(ProcKind.Block, scope.SelfObject, scope, _procDispatcher);
         }
 
         #region Dynamic Operations
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Compiler/ReflectionCache.Generated.cs;C972310
File: ReflectionCache.Generated.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Compiler/ReflectionCache.Generated.cs;C972310  (server)    7/9/2009 4:52 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Compiler/ReflectionCache.Generated.cs;BlockDelegates
@@ -269,6 +269,8 @@
         private static MethodInfo _InitializeScope;
         public static MethodInfo/*!*/ InitializeScopeNoLocals { get { return _InitializeScopeNoLocals ?? (_InitializeScopeNoLocals = GetMethod(typeof(RubyOps), "InitializeScopeNoLocals")); } }
         private static MethodInfo _InitializeScopeNoLocals;
+        public static MethodInfo/*!*/ InstantiateBlock { get { return _InstantiateBlock ?? (_InstantiateBlock = GetMethod(typeof(RubyOps), "InstantiateBlock")); } }
+        private static MethodInfo _InstantiateBlock;
         public static MethodInfo/*!*/ IRubyObject_BaseEquals { get { return _IRubyObject_BaseEquals ?? (_IRubyObject_BaseEquals = GetMethod(typeof(IRubyObject), "BaseEquals")); } }
         private static MethodInfo _IRubyObject_BaseEquals;
         public static MethodInfo/*!*/ IRubyObject_BaseGetHashCode { get { return _IRubyObject_BaseGetHashCode ?? (_IRubyObject_BaseGetHashCode = GetMethod(typeof(IRubyObject), "BaseGetHashCode")); } }
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Compiler/Ast/BlockDefinition.cs;C972310
File: BlockDefinition.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Compiler/Ast/BlockDefinition.cs;C972310  (server)    7/9/2009 4:08 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Compiler/Ast/BlockDefinition.cs;BlockDelegates
@@ -175,24 +175,24 @@
             gen.LeaveBlockDefinition();
 
             int parameterCount = _parameters.LeftValues.Count;
-
             var attributes = _parameters.GetBlockSignatureAttributes();
 
-            return Methods.DefineBlock.OpCall(
-                gen.CurrentScopeVariable,
-                gen.CurrentSelfVariable,
-                BlockDispatcher.CreateLambda(
-                    body,
-                    RubyExceptionData.EncodeMethodName(gen.CurrentMethod.MethodName, gen.SourcePath, Location), 
-                    new ReadOnlyCollection<MSA.ParameterExpression>(parameters),
-                    parameterCount,
-                    attributes
-                ),
-                AstUtils.Constant(parameterCount),
-                AstUtils.Constant(attributes),
-                gen.SourcePathConstant,
-                AstUtils.Constant(Location.Start.Line)
+            var dispatcher = Ast.Constant(
+                BlockDispatcher.Create(parameterCount, attributes, gen.SourcePath, Location.Start.Line), typeof(BlockDispatcher)
             );
+
+            return Ast.Coalesce(
+                Methods.InstantiateBlock.OpCall(gen.CurrentScopeVariable, gen.CurrentSelfVariable, dispatcher),
+                Methods.DefineBlock.OpCall(gen.CurrentScopeVariable, gen.CurrentSelfVariable, dispatcher,
+                    BlockDispatcher.CreateLambda(
+                        body,
+                        RubyExceptionData.EncodeMethodName(gen.CurrentMethod.MethodName, gen.SourcePath, Location),
+                        new ReadOnlyCollection<MSA.ParameterExpression>(parameters),
+                        parameterCount,
+                        attributes
+                    )
+                )
+            );
         }
 
         private MSA.Expression/*!*/ MakeParametersInitialization(AstGenerator/*!*/ gen, MSA.Expression[]/*!*/ parameters) {
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyOps.cs;C972310
File: RubyOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyOps.cs;C972310  (server)    7/9/2009 4:17 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyOps.cs;BlockDelegates
@@ -257,18 +257,15 @@
         #region Blocks
 
         [Emitted]
-        public static Proc/*!*/ DefineBlock(RubyScope/*!*/ scope, object self, Delegate/*!*/ clrMethod,
-            int parameterCount, BlockSignatureAttributes attributesAndArity, string sourcePath, int startLine) {
-            Assert.NotNull(scope, clrMethod);
+        public static Proc InstantiateBlock(RubyScope/*!*/ scope, object self, BlockDispatcher/*!*/ dispatcher) {
+            return (dispatcher.Method != null) ? new Proc(ProcKind.Block, self, scope, dispatcher) : null;
+        }
 
+        [Emitted]
+        public static Proc/*!*/ DefineBlock(RubyScope/*!*/ scope, object self, BlockDispatcher/*!*/ dispatcher, object/*!*/ clrMethod) {
             // DLR closures should not be used:
-            Debug.Assert(!(clrMethod.Target is Closure) ||  ((Closure)clrMethod.Target).Locals == null);
-
-            // closes block over self and context
-            BlockDispatcher dispatcher = BlockDispatcher.Create(clrMethod, parameterCount, attributesAndArity);
-            Proc result = new Proc(ProcKind.Block, self, scope, sourcePath, startLine, dispatcher);
-
-            return result;
+            Debug.Assert(!(((Delegate)clrMethod).Target is Closure) || ((Closure)((Delegate)clrMethod).Target).Locals == null);
+            return new Proc(ProcKind.Block, self, scope, dispatcher.SetMethod(clrMethod));
         }
 
         /// <summary>
===================================================================
