Refine search
@JRubyMethod(name = "===", required = 1) @Override public IRubyObject op_eqq(ThreadContext context, IRubyObject other) { return context.runtime.newBoolean(this == other); }
@JRubyMethod(module = true, visibility = PRIVATE) public static IRubyObject disable(ThreadContext context, IRubyObject recv) { Ruby runtime = context.runtime; emptyImplementationWarning(runtime, ID.GC_DISABLE_UNIMPLEMENTED, "GC.disable"); boolean old = gcDisabled; gcDisabled = true; return runtime.newBoolean(old); }
/** rb_ary_includes * */ @JRubyMethod(name = "include?", required = 1) public RubyBoolean include_p(ThreadContext context, IRubyObject item) { return context.runtime.newBoolean(includes(context, item)); }
/** rb_ary_frozen_p * */ @JRubyMethod(name = "frozen?") @Override public RubyBoolean frozen_p(ThreadContext context) { return context.runtime.newBoolean(isFrozen() || (flags & TMPLOCK_ARR_F) != 0); }
@JRubyMethod(name = "stop?") public RubyBoolean stop_p() { // not valid for "dead" state return getRuntime().newBoolean(status.get() == Status.SLEEP || status.get() == Status.DEAD); }
@Override @JRubyMethod(name = "==", required = 1) public IRubyObject op_equal(ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean(this.equals(obj)); }
@JRubyMethod(name = "closed?") public IRubyObject closed_p(ThreadContext context) { initializedCheck(); return context.runtime.newBoolean(closed); }
@Override @JRubyMethod(name = "positive?") public IRubyObject isPositive(ThreadContext context) { return context.runtime.newBoolean(isPositive()); }
@JRubyMethod(name = "==", required = 1) @Override public IRubyObject op_equal(ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean(this.equals(obj)); }
@JRubyMethod(name = "java_identifier_part?", meta = true) public static IRubyObject java_identifier_part_p(final ThreadContext context, final IRubyObject self, final IRubyObject num) { return context.runtime.newBoolean( java.lang.Character.isJavaIdentifierPart(int_char(num)) ); }
/** * Returns true if the set contains the given object. */ @JRubyMethod(name = "include?", alias = { "member?", "===" }) public RubyBoolean include_p(final ThreadContext context, IRubyObject obj) { return context.runtime.newBoolean( containsImpl(obj) ); }
/** nil_xor * */ @JRubyMethod(name = "^", required = 1) public static RubyBoolean op_xor(ThreadContext context, IRubyObject recv, IRubyObject obj) { return context.runtime.newBoolean(obj.isTrue()); }
/** rb_hash_has_value * */ @JRubyMethod(name = {"has_value?", "value?"}, required = 1) public RubyBoolean has_value_p(ThreadContext context, IRubyObject expected) { return context.runtime.newBoolean(hasValue(context, expected)); }
@JRubyMethod(name = "==", required = 1) @Override public IRubyObject op_equal(ThreadContext context, IRubyObject other) { if(!(other instanceof RubyModule)) return context.fals; RubyModule otherModule = (RubyModule) other; if(otherModule.isIncluded()) { return context.runtime.newBoolean(otherModule.isSame(this)); } else { return context.runtime.newBoolean(isSame(otherModule)); } }
@JRubyMethod(name = "ipv6_mc_nodelocal?") public IRubyObject ipv6_mc_nodelocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCNodeLocal()); }
@JRubyMethod(name = "ipv6_mc_sitelocal?") public IRubyObject ipv6_mc_sitelocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCSiteLocal()); }
@JRubyMethod(name = "unix?", module=true) public static IRubyObject unix_p(ThreadContext context, IRubyObject recv) { return context.runtime.newBoolean(Platform.getPlatform().isUnix()); } @JRubyMethod(name = "bsd?", module=true)
@JRubyMethod(name = "<", required = 1) public IRubyObject op_lt(ThreadContext context, IRubyObject other) { if (other instanceof RubyTime) { return context.runtime.newBoolean(cmp((RubyTime) other) < 0); } return RubyComparable.op_lt(context, this, other); }
@JRubyMethod(name = "===", required = 1) @Override public IRubyObject op_eqq(ThreadContext context, IRubyObject other) { if (other instanceof RubyTime) { return context.runtime.newBoolean(RubyNumeric.fix2int(invokedynamic(context, this, OP_CMP, other)) == 0); } return context.fals; }
@JRubyMethod(name = "==", required = 1) @Override public IRubyObject op_equal(ThreadContext context, IRubyObject other) { if (other instanceof RubyTime) { return context.runtime.newBoolean(cmp((RubyTime) other) == 0); } if (other == context.nil) { return context.fals; } return RubyComparable.op_equal(context, this, other); }