/** num_eql * */ @JRubyMethod(name = "eql?") public IRubyObject eql_p(ThreadContext context, IRubyObject other) { if (getClass() != other.getClass()) return context.fals; return equalInternal(context, this, other) ? context.tru : context.fals; }
/** num_eql * */ @JRubyMethod(name = "eql?") public IRubyObject eql_p(ThreadContext context, IRubyObject other) { if (getClass() != other.getClass()) return context.fals; return equalInternal(context, this, other) ? context.tru : context.fals; }
/** num_eql * */ @JRubyMethod(name = "eql?") public IRubyObject eql_p(ThreadContext context, IRubyObject other) { if (getClass() != other.getClass()) return getRuntime().getFalse(); return equalInternal(context, this, other) ? getRuntime().getTrue() : getRuntime().getFalse(); }
/** num_zero_p * */ @JRubyMethod(name = "zero?") public IRubyObject zero_p(ThreadContext context) { final Ruby runtime = context.runtime; return equalInternal(context, this, RubyFixnum.zero(runtime)) ? runtime.getTrue() : runtime.getFalse(); }
/** num_zero_p * */ @JRubyMethod(name = "zero?") public IRubyObject zero_p(ThreadContext context) { final Ruby runtime = context.runtime; return equalInternal(context, this, RubyFixnum.zero(runtime)) ? runtime.getTrue() : runtime.getFalse(); }
/** num_eql * */ @JRubyMethod(name = "eql?") public IRubyObject eql_p(ThreadContext context, IRubyObject other) { if (getClass() != other.getClass()) return getRuntime().getFalse(); return equalInternal(context, this, other) ? getRuntime().getTrue() : getRuntime().getFalse(); }
/** num_zero_p * */ @JRubyMethod(name = "zero?") public IRubyObject zero_p(ThreadContext context) { return equalInternal(context, this, RubyFixnum.zero(getRuntime())) ? getRuntime().getTrue() : getRuntime().getFalse(); }
/** num_zero_p * */ @JRubyMethod(name = "zero?") public IRubyObject zero_p(ThreadContext context) { return equalInternal(context, this, RubyFixnum.zero(getRuntime())) ? getRuntime().getTrue() : getRuntime().getFalse(); }
/** num_remainder * */ @JRubyMethod(name = "remainder") public IRubyObject remainder(ThreadContext context, IRubyObject dividend) { IRubyObject z = callMethod(context, "%", dividend); IRubyObject x = this; RubyFixnum zero = RubyFixnum.zero(getRuntime()); if (!equalInternal(context, z, zero) && ((x.callMethod(context, "<", zero).isTrue() && dividend.callMethod(context, ">", zero).isTrue()) || (x.callMethod(context, ">", zero).isTrue() && dividend.callMethod(context, "<", zero).isTrue()))) { return z.callMethod(context, "-", dividend); } else { return z; } }
/** num_remainder * */ @JRubyMethod(name = "remainder") public IRubyObject remainder(ThreadContext context, IRubyObject dividend) { IRubyObject z = callMethod(context, "%", dividend); IRubyObject x = this; RubyFixnum zero = RubyFixnum.zero(getRuntime()); if (!equalInternal(context, z, zero) && ((x.callMethod(context, "<", zero).isTrue() && dividend.callMethod(context, ">", zero).isTrue()) || (x.callMethod(context, ">", zero).isTrue() && dividend.callMethod(context, "<", zero).isTrue()))) { return z.callMethod(context, "-", dividend); } else { return z; } }