Index: src/IronRuby.Libraries/Builtins/BigNumOps.cs
===================================================================
--- src/IronRuby.Libraries/Builtins/BigNumOps.cs	(revision 156)
+++ src/IronRuby.Libraries/Builtins/BigNumOps.cs	(working copy)
@@ -507,8 +507,8 @@
 
         [RubyMethod("<<")]
         public static object LeftShift(BigInteger/*!*/ self, [NotNull]BigInteger/*!*/ other) {
-            // TODO:
-            throw new NotImplementedException();
+            // Dodgy error message but matches MRI
+            throw RubyExceptions.CreateRangeError("bignum too big to convert into long");
         }
 
         /// <summary>
@@ -545,8 +545,10 @@
 
         [RubyMethod(">>")]
         public static object RightShift(BigInteger/*!*/ self, [NotNull]BigInteger/*!*/ other) {
-            // TODO:
-            throw new NotImplementedException();
+            if ( self.IsNegative() ) {
+                return -1;
+            }
+            return 0;
         }
 
         /// <summary>
Index: src/IronRuby.Libraries/Builtins/FixnumOps.cs
===================================================================
--- src/IronRuby.Libraries/Builtins/FixnumOps.cs	(revision 156)
+++ src/IronRuby.Libraries/Builtins/FixnumOps.cs	(working copy)
@@ -114,8 +114,7 @@
         /// <remarks>Converts to Bignum if the result cannot fit into Fixnum</remarks>
         [RubyMethod("<<")]
         public static object LeftShift(CodeContext/*!*/ context, int self, object other) {
-            int intOther = (int)Protocols.ConvertToInteger(context, other);
-            return LeftShift(self, intOther);
+            return BignumOps.LeftShift(context, self, other);
         }
         #endregion
 
@@ -147,8 +146,7 @@
         /// <remarks>Converts to Bignum if the result cannot fit into Fixnum</remarks>
         [RubyMethod(">>")]
         public static object RightShift(CodeContext/*!*/ context, int self, object other) {
-            int intOther = (int)Protocols.ConvertToInteger(context, other);
-            return RightShift(self, intOther);
+            return BignumOps.RightShift(context, self, other);
         }
         #endregion
 
@@ -235,8 +233,7 @@
         /// </summary>
         [RubyMethod("^")]
         public static object BitwiseXor(CodeContext/*!*/ context, int self, object other) {
-            other = Protocols.ConvertToInteger(context, other);
-            return self ^ Protocols.CastToFixnum(context, other);
+            return BignumOps.Xor(context, self, other);
         }
         #endregion
 
@@ -260,8 +257,7 @@
         /// </summary>
         [RubyMethod("&")]
         public static object BitwiseAnd(CodeContext/*!*/ context, int self, object other) {
-            other = Protocols.ConvertToInteger(context, other);
-            return self & Protocols.CastToFixnum(context, other);
+            return BignumOps.And(context, self, other);
         }
         #endregion
 
@@ -285,8 +281,7 @@
         /// </summary>
         [RubyMethod("|")]
         public static object BitwiseOr(CodeContext/*!*/ context, int self, object other) {
-            other = Protocols.ConvertToInteger(context, other);
-            return self | Protocols.CastToFixnum(context, other);
+            return BignumOps.BitwiseOr(context, self, other);
         }
         #endregion
 
Index: src/IronRuby.Libraries/Builtins/FloatOps.cs
===================================================================
--- src/IronRuby.Libraries/Builtins/FloatOps.cs	(revision 156)
+++ src/IronRuby.Libraries/Builtins/FloatOps.cs	(working copy)
@@ -26,8 +26,9 @@
         /// <summary>
         /// Smallest Float such that 1.0+EPSILON != 1.0
         /// </summary>
+        /// <remarks>System.Double.Epsilon is not actually the correct value!</remarks>
         [RubyConstant]
-        public const double EPSILON = double.Epsilon;
+        public const double EPSILON = 0.0000000000000002220446049250313080847263336181640625;
         /// <summary>
         /// The smallest Float greater than zero
         /// </summary>
@@ -81,7 +82,7 @@
         [RubyConstant]
         public const int RADIX = 2;
         /// <summary>
-        // TODO: No idea what this constant is for.
+        /// Rounding mode used by Float
         /// </summary>
         [RubyConstant]
         public const int ROUNDS = 1;
@@ -543,7 +544,7 @@
         /// </remarks>
         [RubyMethod("to_s")]
         public static MutableString ToS(RubyScope/*!*/ scope, double self) {
-            StringFormatter sf = new StringFormatter(scope, "%.15g", new object[] { self });
+            StringFormatter sf = new StringFormatter(scope, "%.14g", new object[] { self });
             sf.TrailingZeroAfterWholeFloat = true;
             return sf.Format();
         }
@@ -863,16 +864,15 @@
         }
 
         public static bool IsNegativeZero(double self) {
-            if (self != 0.0) {
-                return false;
+#if SILVERLIGHT // BitConverter.DoubleToInt64Bits
+            if ( self != 0.0 ) {
+              return false;
             }
-#if SILVERLIGHT // BitConverter.DoubleToInt64Bits
             byte[] bits = BitConverter.GetBytes(self);
             return (bits[7] == 0x80 && bits[6] == 0x00 && bits[5] == 0x00 && bits[4] == 0x00
                 && bits[3] == 0x00 && bits[2] == 0x00 && bits[1] == 0x00 && bits[0] == 0x00);
 #else
-            ulong bits = unchecked((ulong)BitConverter.DoubleToInt64Bits(self));
-            return ((bits & 0x8000000000000000) != 0);
+            return (self == 0.0 && 1.0/self < 0);
 #endif
         }
 
Index: src/IronRuby.Libraries/Builtins/Integer.cs
===================================================================
--- src/IronRuby.Libraries/Builtins/Integer.cs	(revision 156)
+++ src/IronRuby.Libraries/Builtins/Integer.cs	(working copy)
@@ -112,7 +112,7 @@
         /// </remarks>
         [RubyMethod("downto")]
         public static object DownTo(BlockParam block, int self, int other) {
-            if (self < other && block == null) {
+            if (self >= other && block == null) {
                 throw RubyExceptions.NoBlockGiven();
             }
 
@@ -285,7 +285,7 @@
         /// </remarks>
         [RubyMethod("upto")]
         public static object UpTo(BlockParam block, int self, int other) {
-            if (block == null && self > other) {
+            if (block == null && self <= other) {
                 throw RubyExceptions.NoBlockGiven();
             }
 
Index: src/IronRuby.Libraries/Builtins/Numeric.cs
===================================================================
--- src/IronRuby.Libraries/Builtins/Numeric.cs	(revision 156)
+++ src/IronRuby.Libraries/Builtins/Numeric.cs	(working copy)
@@ -248,14 +248,16 @@
         [RubyMethod("remainder")]
         public static object Remainder(CodeContext/*!*/ context, object self, object other) {
             object modulo = LibrarySites.Modulo(context, self, other);
-            bool selfNegative = (bool)LibrarySites.LessThan(context, self, 0);
-            bool otherNegative = (bool)LibrarySites.LessThan(context, other, 0);
-            bool moduloIsZero = Protocols.IsEqual(context, modulo, 0);
-            if (!moduloIsZero && (selfNegative  != otherNegative) ) {
-                return LibrarySites.Minus(context, modulo, other);
-            } else {
-                return modulo;
+            if (!Protocols.IsEqual(context, modulo, 0)) {
+                // modulo is not zero
+                if ((bool) LibrarySites.LessThan(context, self, 0) && (bool) LibrarySites.GreaterThan(context, other, 0) ||
+                    (bool) LibrarySites.GreaterThan(context, self, 0) && (bool) LibrarySites.LessThan(context, other, 0) ) {
+                    // (self is negative and other is positive) OR (self is positive and other is negative)
+                    return LibrarySites.Minus(context, modulo, other);
+                }
             }
+            // Either modulo is zero or self and other are not of the same sign
+            return modulo;
         }
         #endregion
 
@@ -386,7 +388,7 @@
                     compare = LibrarySites.LessThan;
                 }
                 object current = self;
-                while((bool)compare.Invoke(context, current, limit)) {
+                while(!(bool)compare.Invoke(context, current, limit)) {
                     object result;
                     if (YieldStep(block, current, out result)) {
                         return result;
Index: src/IronRuby.Libraries/initializers.generated.cs
===================================================================
--- src/IronRuby.Libraries/initializers.generated.cs	(revision 156)
+++ src/IronRuby.Libraries/initializers.generated.cs	(working copy)
@@ -78,14 +78,14 @@
             ExtendModule(typeof(System.Collections.Generic.IDictionary<System.Object, System.Object>), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__Collections__Generic__IDictionary_Instance), null, new IronRuby.Builtins.RubyModule[] {def17, });
             ExtendModule(typeof(System.Collections.IEnumerable), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__Collections__IEnumerable_Instance), null, new IronRuby.Builtins.RubyModule[] {def17, });
             ExtendModule(typeof(System.Collections.IList), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__Collections__IList_Instance), null, new IronRuby.Builtins.RubyModule[] {def17, });
-            IronRuby.Builtins.RubyModule def31 = ExtendModule(typeof(System.IComparable), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__IComparable_Instance), null, new IronRuby.Builtins.RubyModule[] {def26, });
+            ExtendModule(typeof(System.IComparable), new System.Action<IronRuby.Builtins.RubyModule>(LoadSystem__IComparable_Instance), null, new IronRuby.Builtins.RubyModule[] {def26, });
             DefineGlobalClass("Array", typeof(IronRuby.Builtins.RubyArray), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadArray_Instance), new System.Action<IronRuby.Builtins.RubyModule>(LoadArray_Class), new IronRuby.Builtins.RubyModule[] {def17, }, new System.Delegate[] {
                 new System.Func<IronRuby.Builtins.RubyClass, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArrayOps.CreateArray),
                 new System.Func<IronRuby.Runtime.RubyScope, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyClass, System.Object, System.Object>(IronRuby.Builtins.ArrayOps.CreateArray),
                 new System.Func<IronRuby.Builtins.RubyClass, System.Int32, System.Object, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArrayOps.CreateArray),
             });
             DefineGlobalClass("Binding", typeof(IronRuby.Builtins.Binding), Context.ObjectClass, null, null, IronRuby.Builtins.RubyModule.EmptyArray, null);
-            DefineGlobalClass("ClrString", typeof(System.String), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadClrString_Instance), null, new IronRuby.Builtins.RubyModule[] {def31, }, null);
+            DefineGlobalClass("ClrString", typeof(System.String), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadClrString_Instance), null, IronRuby.Builtins.RubyModule.EmptyArray, null);
             DefineGlobalClass("Dir", typeof(IronRuby.Builtins.RubyDir), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadDir_Instance), new System.Action<IronRuby.Builtins.RubyModule>(LoadDir_Class), new IronRuby.Builtins.RubyModule[] {def17, }, null);
             #if !SILVERLIGHT
             DefineGlobalClass("Encoding", typeof(IronRuby.Builtins.RubyEncoding), Context.ObjectClass, new System.Action<IronRuby.Builtins.RubyModule>(LoadEncoding_Instance), new System.Action<IronRuby.Builtins.RubyModule>(LoadEncoding_Class), IronRuby.Builtins.RubyModule.EmptyArray, new System.Delegate[] {
@@ -6833,11 +6833,11 @@
             });
             
             module.DefineLibraryMethod(">", 0x9, new System.Delegate[] {
+                new System.Func<IronRuby.StandardLibrary.BigDecimal.BigDecimal, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.GreaterThan),
                 new System.Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, Microsoft.Scripting.Math.BigInteger, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.GreaterThan),
                 new System.Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Int32, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.GreaterThan),
                 new System.Func<IronRuby.Runtime.RubyContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Double, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.GreaterThan),
                 new System.Func<Microsoft.Scripting.Runtime.CodeContext, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Object, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.GreaterThan),
-                new System.Func<IronRuby.StandardLibrary.BigDecimal.BigDecimal, IronRuby.StandardLibrary.BigDecimal.BigDecimal, System.Object>(IronRuby.StandardLibrary.BigDecimal.BigDecimalOps.GreaterThan),
             });
             
             module.DefineLibraryMethod(">=", 0x9, new System.Delegate[] {
