edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/IronRuby.Tests/Runtime/HostingTests.cs;C802353
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/EqualityComparer.cs;C806880
File: EqualityComparer.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/EqualityComparer.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/EqualityComparer.cs;MetaConv1
@@ -30,7 +30,7 @@
         private readonly RubyContext/*!*/ _context;
 
         private readonly CallSite<Func<CallSite, object, object>>/*!*/ _hashSite;
-        private readonly CallSite<Func<CallSite, object, object, bool>>/*!*/ _eqlSite;
+        private readonly CallSite<Func<CallSite, object, object, object>>/*!*/ _eqlSite;
 
         // friend: RubyContext
         internal EqualityComparer(RubyContext/*!*/ context) {
@@ -39,13 +39,13 @@
             _hashSite = CallSite<Func<CallSite, object, object>>.Create(
                 RubyCallAction.Make(context, "hash", RubyCallSignature.WithImplicitSelf(0))
              );
-            _eqlSite = CallSite<Func<CallSite, object, object, bool>>.Create(
+            _eqlSite = CallSite<Func<CallSite, object, object, object>>.Create(
                 RubyCallAction.Make(context, "eql?", RubyCallSignature.WithImplicitSelf(1))
             );
         }
 
         bool IEqualityComparer<object>.Equals(object x, object y) {
-            return x == y || _eqlSite.Target(_eqlSite, x, y);
+            return x == y || RubyOps.IsTrue(_eqlSite.Target(_eqlSite, x, y));
         }
 
         int IEqualityComparer<object>.GetHashCode(object obj) {
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/IOWrapper.cs;C806880
File: IOWrapper.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/IOWrapper.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/IOWrapper.cs;MetaConv1
@@ -26,9 +26,9 @@
 
     public class IOWrapper : Stream {
         private readonly CallSite<Func<CallSite, object, MutableString, object>> _writeSite;
-        private readonly CallSite<Func<CallSite, object, int, MutableString>> _readSite;
+        private readonly CallSite<Func<CallSite, object, int, object>> _readSite;
         private readonly CallSite<Func<CallSite, object, long, int, object>> _seekSite;
-        private readonly CallSite<Func<CallSite, object, long>> _tellSite;
+        private readonly CallSite<Func<CallSite, object, object>> _tellSite;
             
 
         private readonly RubyContext/*!*/ _context;
@@ -53,13 +53,13 @@
             _writeSite = CallSite<Func<CallSite, object, MutableString, object>>.Create(
                 RubyCallAction.Make(context, "write", RubyCallSignature.WithImplicitSelf(1))
             );
-            _readSite = CallSite<Func<CallSite, object, int, MutableString>>.Create(
+            _readSite = CallSite<Func<CallSite, object, int, object>>.Create(
                 RubyCallAction.Make(context, "read", RubyCallSignature.WithImplicitSelf(1))
             );
             _seekSite = CallSite<Func<CallSite, object, long, int, object>>.Create(
                 RubyCallAction.Make(context, "seek", RubyCallSignature.WithImplicitSelf(2))
             );
-            _tellSite = CallSite<Func<CallSite, object, long>>.Create(
+            _tellSite = CallSite<Func<CallSite, object, object>>.Create(
                 RubyCallAction.Make(context, "tell", RubyCallSignature.WithImplicitSelf(0))
             );
 
@@ -111,7 +111,8 @@
                 if (!_canSeek) {
                     throw new NotSupportedException();
                 }
-                return _tellSite.Target(_tellSite, _obj);
+                // TODO: conversion
+                return (long)_tellSite.Target(_tellSite, _obj);
             }
             set {
                 if (!_canSeek) {
@@ -201,7 +202,8 @@
         }
 
         private int ReadFromObject(byte[]/*!*/ buffer, int offset, int count) {
-            MutableString result = _readSite.Target(_readSite, _obj, count);
+            // TODO: conversion
+            MutableString result = (MutableString)_readSite.Target(_readSite, _obj, count);
             if (result == null) {
                 return 0;
             } else {
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;C806880
File: RubyExceptionData.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs;MetaConv1
@@ -58,7 +58,7 @@
         // can be set explicitly by the user (even to nil):
         private RubyArray _backtrace;
 
-        private CallSite<Action<CallSite, RubyContext, Exception, RubyArray>>/*!*/ _setBacktraceCallSite;
+        private CallSite<Func<CallSite, RubyContext, Exception, RubyArray, object>>/*!*/ _setBacktraceCallSite;
 
         private RubyExceptionData(Exception/*!*/ exception) {
             _exception = exception;
@@ -111,7 +111,7 @@
         /// </summary>
         private void SetBacktraceForRaise(RubyContext/*!*/ context, RubyArray backtrace) {
             if (_setBacktraceCallSite == null) {
-                Interlocked.CompareExchange(ref _setBacktraceCallSite, CallSite<Action<CallSite, RubyContext, Exception, RubyArray>>.
+                Interlocked.CompareExchange(ref _setBacktraceCallSite, CallSite<Func<CallSite, RubyContext, Exception, RubyArray, object>>.
                     Create(RubyCallAction.MakeShared("set_backtrace", RubyCallSignature.WithImplicitSelf(1))), null);
             }
             _setBacktraceCallSite.Target(_setBacktraceCallSite, context, _exception, backtrace);
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/CompositeConversionAction.cs;C806880
File: CompositeConversionAction.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/CompositeConversionAction.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/CompositeConversionAction.cs;MetaConv1
@@ -46,6 +46,10 @@
             _resultType = resultType;
         }
 
+        public override Type/*!*/ ResultType {
+            get { return _resultType; }
+        }
+
         public static CompositeConversionAction Make(RubyContext context, CompositeConversion conversion) {
             switch (conversion) {
                 case CompositeConversion.ToFixnumToStr:
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/ConvertToSAction.cs;C806880
File: ConvertToSAction.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/ConvertToSAction.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/ConvertToSAction.cs;MetaConv1
@@ -31,6 +31,10 @@
     // 2) calls to_s
     // 3) default conversion if (2) returns a non-string
     public sealed class ConvertToSAction : RubyConversionAction, IExpressionSerializable {
+        public override Type/*!*/ ResultType {
+            get { return typeof(MutableString); }
+        }
+
         public static ConvertToSAction/*!*/ Make(RubyContext/*!*/ context) {
             return context.MetaBinderFactory.Conversion<ConvertToSAction>();
         }
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/MetaObjectBuilder.cs;C806880
File: MetaObjectBuilder.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/MetaObjectBuilder.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/MetaObjectBuilder.cs;MetaConv1
@@ -79,14 +79,26 @@
         private static int _ruleCounter;
 #endif
 
+        internal DynamicMetaObject/*!*/ CreateMetaObject(RubyMetaBinder/*!*/ action) {
+            return CreateMetaObject(action, action.ResultType);
+        }
+
+        internal DynamicMetaObject/*!*/ CreateMetaObject(ConvertBinder/*!*/ action) {
+            return CreateMetaObject(action, action.Type);
+        }
+
         internal DynamicMetaObject/*!*/ CreateMetaObject(DynamicMetaObjectBinder/*!*/ action) {
+            return CreateMetaObject(action, typeof(object));
+        }
+
+        private DynamicMetaObject/*!*/ CreateMetaObject(DynamicMetaObjectBinder/*!*/ action, Type/*!*/ returnType) {
             Debug.Assert(ControlFlowBuilder == null, "Control flow required but not built");
 
-            var expr = _error ? Ast.Throw(_result) : _result;
+            var expr = _error ? Ast.Throw(_result, returnType) : AstUtils.Convert(_result, returnType);
 
             if (_condition != null) {
-                var deferral = action.GetUpdateExpression(typeof(object));
-                expr = Ast.Condition(_condition, AstUtils.Convert(expr, typeof(object)), deferral);
+                var deferral = action.GetUpdateExpression(returnType);
+                expr = Ast.Condition(_condition, expr, deferral);
             }
 
             if (_temps != null) {
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/ProtocolConversionAction.cs;C806880
File: ProtocolConversionAction.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/ProtocolConversionAction.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/ProtocolConversionAction.cs;MetaConv1
@@ -77,7 +77,7 @@
                 metaBuilder.SetWrongNumberOfArgumentsError(normalizedArgs.Length, 0);
             }
 
-            return metaBuilder.CreateMetaObject(interopBinder);
+            return metaBuilder.CreateMetaObject(this);
         }
 
         public static RubyConversionAction TryGetDefaultConversionAction(RubyContext/*!*/ context, Type/*!*/ parameterType) {
@@ -142,8 +142,14 @@
 
         protected abstract bool TryImplicitConversion(MetaObjectBuilder/*!*/ metaBuilder, CallArguments/*!*/ args);
 
+        public override Type/*!*/ ResultType {
+            get { 
+                return (ConversionResultValidator != null) ? ConversionResultValidator.ReturnType : typeof(object); 
+            }
+        }
+
         protected override void Build(MetaObjectBuilder/*!*/ metaBuilder, CallArguments/*!*/ args) {
-            BuildConversion(metaBuilder, args, ConversionResultValidator != null ? ConversionResultValidator.ReturnType : typeof(object), this);
+            BuildConversion(metaBuilder, args, ResultType, this);
         }
 
         internal static void BuildConversion(MetaObjectBuilder/*!*/ metaBuilder, CallArguments/*!*/ args, Type/*!*/ resultType, 
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyCallAction.cs;C806880
File: RubyCallAction.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyCallAction.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyCallAction.cs;MetaConv1
@@ -41,6 +41,10 @@
             get { return _methodName; }
         }
 
+        public override Type/*!*/ ResultType {
+            get { return typeof(object); }
+        }
+
         internal protected RubyCallAction(RubyContext context, string/*!*/ methodName, RubyCallSignature signature) 
             : base(context) {
             Assert.NotNull(methodName);
@@ -208,7 +212,7 @@
             var interopBinder = GetInteropBinder(args.RubyContext, callInfo);
             var result = interopBinder.Bind(args.MetaTarget, normalizedArgs);
             metaBuilder.SetMetaResult(result, args);
-            return metaBuilder.CreateMetaObject(interopBinder);
+            return metaBuilder.CreateMetaObject(this);
         }
 
         
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyMetaBinder.cs;C806880
File: RubyMetaBinder.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyMetaBinder.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyMetaBinder.cs;MetaConv1
@@ -15,6 +15,7 @@
 
 using System.Dynamic;
 using System.Diagnostics;
+using System;
 
 namespace IronRuby.Runtime.Calls {
     public abstract class RubyMetaBinder : DynamicMetaObjectBinder {
@@ -37,8 +38,8 @@
         
         public abstract RubyCallSignature Signature { get; }
         protected abstract void Build(MetaObjectBuilder/*!*/ metaBuilder, CallArguments/*!*/ args);
-
         protected abstract DynamicMetaObject/*!*/ InteropBind(MetaObjectBuilder/*!*/ metaBuilder, CallArguments/*!*/ args);
+        public abstract Type/*!*/ ResultType { get; }
 
         public override DynamicMetaObject/*!*/ Bind(DynamicMetaObject/*!*/ scopeOrContextOrTarget, DynamicMetaObject/*!*/[]/*!*/ args) {
             var callArgs = new CallArguments(_context, scopeOrContextOrTarget, args, Signature);
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/SuperCallAction.cs;C806880
File: SuperCallAction.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/SuperCallAction.cs;C806880  (server)    4/7/2009 9:00 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/SuperCallAction.cs;MetaConv1
@@ -57,6 +57,10 @@
             get { return _signature; }
         }
 
+        public override Type/*!*/ ResultType {
+            get { return typeof(object); }
+        }
+
         #region Rule Generation
 
         protected override void Build(MetaObjectBuilder/*!*/ metaBuilder, CallArguments/*!*/ args) {
===================================================================
