/// <summary> /// Check that the object, when converted to an integer, is not less than or equal to zero. /// </summary> private static void CheckStep( BinaryOpSite /*!*/ lessThanSite, BinaryOpSite /*!*/ equalsSite, object step) { if (Protocols.IsTrue(equalsSite.Target(equalsSite, step, 0))) { throw RubyExceptions.CreateArgumentError("step can't be 0"); } if (RubyOps.IsTrue(lessThanSite.Target(lessThanSite, step, 0))) { throw RubyExceptions.CreateArgumentError("step can't be negative"); } }
/// <summary> /// Check that the object, when converted to an integer, is not less than or equal to zero. /// </summary> private static void CheckStep( BinaryOpSite/*!*/ lessThanSite, BinaryOpSite/*!*/ equalsSite, object step) { if (Protocols.IsTrue(equalsSite.Target(equalsSite, step, 0))) { throw RubyExceptions.CreateArgumentError("step can't be 0"); } if (RubyOps.IsTrue(lessThanSite.Target(lessThanSite, step, 0))) { throw RubyExceptions.CreateArgumentError("step can't be negative"); } }