edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/symbol/to_proc_spec.rb;C807294
File: to_proc_spec.rb
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/symbol/to_proc_spec.rb;C807294  (server)    3/5/2010 10:33 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/symbol/to_proc_spec.rb;SymToProc
@@ -12,5 +12,21 @@
       obj.should_receive(:to_s).and_return("Received #to_s")
       :to_s.to_proc.call(obj).should == "Received #to_s"
     end
+    
+    it "sends arguments passed when calling #call on the proc" do
+      obj = mock("Receiving #foo")
+      obj.should_receive(:foo).with(1)
+      :foo.to_proc.call(obj, 1)
+    end
+
+    it "can send different number of arguments passed when calling #call on the proc" do
+      p = :foo.to_proc
+      obj1 = mock("Receiving #foo with 1 argument")
+      obj1.should_receive(:foo).with(1)
+      obj2 = mock("Receiving #foo with 2 argument")
+      obj2.should_receive(:foo).with(1, 2)
+      p.call(obj1, 1)
+      p.call(obj2, 1, 2)
+    end
   end
 end
\ No newline at end of file
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/RubyTests.cs;C1643171
File: RubyTests.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/RubyTests.cs;C1643171  (server)    3/5/2010 2:19 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/RubyTests.cs;SymToProc
@@ -733,6 +733,7 @@
                 BEGIN1,
                 BEGIN2,
                 BEGIN3,
+                SymbolToProc1,
 
                 Backtrace1,
                 Backtrace2,
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/BlockTests.cs;C1599184
File: BlockTests.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/BlockTests.cs;C1599184  (server)    3/5/2010 2:16 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/BlockTests.cs;SymToProc
@@ -2153,6 +2153,32 @@
 true
 ");
         }
+
+        public void SymbolToProc1() {
+            TestOutput(@"
+class C
+  def bar
+    yield(self) rescue p $!
+  end
+
+  private
+  def foo; 'foo'; end
+  def to_s; 'C'; end
+end
+
+C.new.bar(&:foo)
+
+n = :nil?.to_proc
+p n.call(nil)
+n.call() rescue p $!
+p n.call([1,2])
+", @"
+#<NoMethodError: private method `foo' called for C:C>
+true
+#<ArgumentError: no receiver given>
+false
+");
+        }
     }
 }
 
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C1613222
File: Initializers.Generated.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C1613222  (server)    3/5/2010 10:33 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;SymToProc
@@ -2073,9 +2073,9 @@
             );
             
             DefineLibraryMethod(module, "each", 0x51, 
-                0x00040000U, 0x00000000U, 
-                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.RubyIOOps.Each), 
-                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, System.Object>(IronRuby.Builtins.RubyIOOps.Each)
+                0x00000000U, 0x00040000U, 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, System.Object>(IronRuby.Builtins.RubyIOOps.Each), 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.RubyIOOps.Each)
             );
             
             DefineLibraryMethod(module, "each_byte", 0x51, 
@@ -2084,9 +2084,9 @@
             );
             
             DefineLibraryMethod(module, "each_line", 0x51, 
-                0x00040000U, 0x00000000U, 
-                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.RubyIOOps.Each), 
-                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, System.Object>(IronRuby.Builtins.RubyIOOps.Each)
+                0x00000000U, 0x00040000U, 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, System.Object>(IronRuby.Builtins.RubyIOOps.Each), 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyIO, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.RubyIOOps.Each)
             );
             
             DefineLibraryMethod(module, "eof", 0x51, 
@@ -3692,11 +3692,11 @@
             );
             
             DefineLibraryMethod(module, "puts", 0x52, 
-                0x00000000U, 0x00000000U, 0x00000004U, 0x80000000U, 
-                new Action<IronRuby.Runtime.BinaryOpStorage, System.Object>(IronRuby.Builtins.KernelOps.PutsEmptyLine), 
+                0x00000000U, 0x00000004U, 0x80000000U, 0x00000000U, 
                 new Action<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.ConversionStorage<System.Collections.IList>, System.Object, System.Object>(IronRuby.Builtins.KernelOps.PutString), 
                 new Action<IronRuby.Runtime.BinaryOpStorage, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.KernelOps.PutString), 
-                new Action<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.ConversionStorage<System.Collections.IList>, System.Object, System.Object[]>(IronRuby.Builtins.KernelOps.PutString)
+                new Action<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.ConversionStorage<System.Collections.IList>, System.Object, System.Object[]>(IronRuby.Builtins.KernelOps.PutString), 
+                new Action<IronRuby.Runtime.BinaryOpStorage, System.Object>(IronRuby.Builtins.KernelOps.PutsEmptyLine)
             );
             
             DefineLibraryMethod(module, "raise", 0x52, 
@@ -4062,11 +4062,11 @@
             );
             
             DefineLibraryMethod(module, "puts", 0x61, 
-                0x00000000U, 0x00000000U, 0x00000004U, 0x80000000U, 
-                new Action<IronRuby.Runtime.BinaryOpStorage, System.Object>(IronRuby.Builtins.KernelOps.PutsEmptyLine), 
+                0x00000000U, 0x00000004U, 0x80000000U, 0x00000000U, 
                 new Action<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.ConversionStorage<System.Collections.IList>, System.Object, System.Object>(IronRuby.Builtins.KernelOps.PutString), 
                 new Action<IronRuby.Runtime.BinaryOpStorage, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.KernelOps.PutString), 
-                new Action<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.ConversionStorage<System.Collections.IList>, System.Object, System.Object[]>(IronRuby.Builtins.KernelOps.PutString)
+                new Action<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.ConversionStorage<IronRuby.Builtins.MutableString>, IronRuby.Runtime.ConversionStorage<System.Collections.IList>, System.Object, System.Object[]>(IronRuby.Builtins.KernelOps.PutString), 
+                new Action<IronRuby.Runtime.BinaryOpStorage, System.Object>(IronRuby.Builtins.KernelOps.PutsEmptyLine)
             );
             
             DefineLibraryMethod(module, "raise", 0x61, 
@@ -6352,6 +6352,11 @@
                 new Func<IronRuby.Builtins.RubySymbol, System.Int32>(IronRuby.Builtins.SymbolOps.ToInteger)
             );
             
+            DefineLibraryMethod(module, "to_proc", 0x51, 
+                0x00000000U, 
+                new Func<IronRuby.Runtime.RubyScope, IronRuby.Builtins.RubySymbol, IronRuby.Builtins.Proc>(IronRuby.Builtins.SymbolOps.ToProc)
+            );
+            
             DefineLibraryMethod(module, "to_s", 0x51, 
                 0x00000000U, 
                 new Func<IronRuby.Builtins.RubySymbol, IronRuby.Builtins.MutableString>(IronRuby.Builtins.SymbolOps.ToString)
@@ -10239,12 +10244,12 @@
             );
             
             DefineLibraryMethod(module, "<=>", 0x11, 
-                new[] { 0x00000000U, 0x00000002U, 0x00000004U, 0x00000000U, 0x00000000U}, 
-                new Func<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.BinaryOpStorage, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Object, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare), 
+                new[] { 0x00000002U, 0x00000004U, 0x00000000U, 0x00000000U, 0x00000000U}, 
                 new Func<IronRuby.StandardLibrary.BigDecimal.BigDecimal, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare), 
                 new Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, Microsoft.Scripting.Math.BigInteger, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare), 
                 new Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Int32, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare), 
-                new Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Double, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare)
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Double, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare), 
+                new Func<IronRuby.Runtime.BinaryOpStorage, IronRuby.Runtime.BinaryOpStorage, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Object, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.Compare)
             );
             
             DefineLibraryMethod(module, "==", 0x11, 
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ProcOps.cs;C1569144
File: ProcOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ProcOps.cs;C1569144  (server)    3/5/2010 10:59 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ProcOps.cs;SymToProc
@@ -72,9 +72,11 @@
 
             var str = RubyUtils.ObjectToMutableStringPrefix(context, self);
             str.Append('@');
-            str.Append(self.SourcePath ?? "(unknown)");
-            str.Append(':');
-            str.Append(self.SourceLine.ToString(CultureInfo.InvariantCulture));
+            if (self.SourcePath != null || self.SourceLine != 0) {
+                str.Append(self.SourcePath ?? "(unknown)");
+                str.Append(':');
+                str.Append(self.SourceLine.ToString(CultureInfo.InvariantCulture));
+            }
 
             if (context.RubyOptions.Compatibility >= RubyCompatibility.Ruby19 && self.Kind == ProcKind.Lambda) {
                 str.Append(" (lambda)"); 
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/SymbolOps.cs;C1496258
File: SymbolOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/SymbolOps.cs;C1496258  (server)    3/5/2010 10:33 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/SymbolOps.cs;SymToProc
@@ -141,6 +141,11 @@
             return self.ToString();
         }
 
+        [RubyMethod("to_proc")]
+        public static Proc/*!*/ ToProc(RubyScope/*!*/ scope, RubySymbol/*!*/ self) {
+            return Proc.CreateMethodInvoker(scope, self.ToString());
+        }
+
         #endregion
 
         #region 1.9 Methods
@@ -204,8 +209,6 @@
         // succ
         // slice
 
-        // to_proc
-
         // swapcase
         // upcase
         // capitalize
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;C1569144
File: Proc.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;C1569144  (server)    3/5/2010 1:44 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Builtins/Proc.cs;SymToProc
@@ -23,17 +23,17 @@
 using System.Diagnostics;
 using System.Dynamic;
 using System.Reflection;
+using System.Runtime.CompilerServices;
 using Microsoft.Scripting.Runtime;
 using Microsoft.Scripting.Utils;
 using IronRuby.Compiler;
 using IronRuby.Runtime;
 using IronRuby.Runtime.Calls;
 
-using AstFactory = IronRuby.Compiler.Ast.AstFactory;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
-
 namespace IronRuby.Builtins {
     using Ast = Expression;
+    using AstFactory = IronRuby.Compiler.Ast.AstFactory;
+    using AstUtils = Microsoft.Scripting.Ast.Utils;
 
     using BlockCallTarget0 = Func<BlockParam, object, object>;
     using BlockCallTarget1 = Func<BlockParam, object, object, object>;
@@ -41,6 +41,7 @@
     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>;
+    using BlockCallTargetUnsplatN = Func<BlockParam, object, object[], RubyArray, object>;
 
     public enum ProcKind {
         Block,
@@ -279,6 +280,44 @@
             );
         }
 
+        /// <summary>
+        /// Creates a proc that invokes a method of given name.
+        /// <code>
+        /// Proc.new do |*args| 
+        ///   raise ArgumentException if args.size == 0
+        ///   obj.methodName(args.delete_at(0), args) 
+        /// end
+        /// </code>
+        /// </summary>
+        public static Proc/*!*/ CreateMethodInvoker(RubyScope/*!*/ scope, string/*!*/ methodName) {
+            ContractUtils.RequiresNotNull(scope, "scope");
+
+            var site = CallSite<Func<CallSite, object, object, object, object>>.Create(
+                RubyCallAction.Make(
+                    scope.RubyContext, methodName,
+                    new RubyCallSignature(0, RubyCallFlags.HasScope | RubyCallFlags.HasSplattedArgument)
+                )
+            );
+
+            var block = new BlockCallTargetUnsplatN((blockParam, self, args, unsplat) => {
+                Debug.Assert(args.Length == 0);
+                if (unsplat.Count == 0) {
+                    throw RubyExceptions.CreateArgumentError("no receiver given");
+                }
+                object target = unsplat[0];
+                unsplat.RemoveAt(0);
+                return site.Target(site, scope, target, unsplat);
+            });
+
+            var procDispatcher = new BlockDispatcherUnsplatN(0,
+                BlockDispatcher.MakeAttributes(BlockSignatureAttributes.HasUnsplatParameter, -1),
+                null, 0
+            );
+
+            procDispatcher.SetMethod(block);
+            return new Proc(ProcKind.Proc, scope.SelfObject, scope, procDispatcher);
+        }
+
         #endregion
 
         public override string/*!*/ ToString() {
===================================================================
