@Override public IRubyObject inspect() { return inspect(getRuntime()); }
@Override public IRubyObject to_s() { return to_s(getRuntime()); }
@Deprecated @Override public IRubyObject inspect() { return inspect(getRuntime()); } @JRubyMethod(name = "inspect", compat = CompatVersion.RUBY1_8)
@Deprecated @Override public IRubyObject inspect() { return inspect(getRuntime()); } @JRubyMethod(name = "inspect", compat = CompatVersion.RUBY1_8)
@Override public RubyString asString() { return to_s(getRuntime()); }
@Deprecated public IRubyObject inspect19() { return inspect19(getRuntime()); }
@Deprecated public RubyFixnum to_i() { return to_i(getRuntime()); }
@Deprecated @Override public RubyFixnum hash() { return getRuntime().newFixnum(hashCode()); }
@Deprecated @Override public RubyFixnum hash() { return getRuntime().newFixnum(hashCode()); }
@Deprecated @Override public RubyFixnum hash() { return getRuntime().newFixnum(hashCode()); }
@Deprecated @Override public RubyFixnum hash() { return getRuntime().newFixnum(hashCode()); }
public ConstMissingInstr(IRScope scope, Variable result, Operand currentModule, RubySymbol missingConst, boolean isPotentiallyRefined) { super(scope, Operation.CONST_MISSING, CallType.FUNCTIONAL, result, missingConst.getRuntime().newSymbol(CONST_MISSING), currentModule, new Operand[]{new Symbol(missingConst)}, null, isPotentiallyRefined); this.missingConst = missingConst; }
public ConstMissingInstr(IRScope scope, Variable result, Operand currentModule, RubySymbol missingConst, boolean isPotentiallyRefined) { super(scope, Operation.CONST_MISSING, CallType.FUNCTIONAL, result, missingConst.getRuntime().newSymbol(CONST_MISSING), currentModule, new Operand[]{new Symbol(missingConst)}, null, isPotentiallyRefined); this.missingConst = missingConst; }
public RubySymbol asInstanceVariable() { ByteList bytes = getBytes().dup(); bytes.prepend((byte) '@'); return newIDSymbol(getRuntime(), bytes); }
/** * Make an instance variable out of this symbol (e.g. :foo will generate :foo=). * @return the new symbol */ public RubySymbol asWriter() { ByteList bytes = getBytes().dup(); bytes.append((byte) '='); return newIDSymbol(getRuntime(), bytes); }
@JRubyMethod(name = {"length", "size"}) public IRubyObject length() { final Ruby runtime = getRuntime(); return RubyFixnum.newFixnum(runtime, newShared(runtime).strLength()); }
/** * Make an instance variable out of this symbol (e.g. :foo will generate :foo=). * @return the new symbol */ public RubySymbol asWriter() { ByteList bytes = getBytes().dup(); bytes.append((byte) '='); return newIDSymbol(getRuntime(), bytes); }
public RubySymbol asInstanceVariable() { ByteList bytes = getBytes().dup(); bytes.prepend((byte) '@'); return newIDSymbol(getRuntime(), bytes); }
@JRubyMethod(name = {"length", "size"}) public IRubyObject length() { final Ruby runtime = getRuntime(); return RubyFixnum.newFixnum(runtime, newShared(runtime).strLength()); }
private boolean isPrintable() { Ruby runtime = getRuntime(); int p = symbolBytes.getBegin(); int end = p + symbolBytes.getRealSize(); byte[] bytes = symbolBytes.getUnsafeBytes(); Encoding enc = symbolBytes.getEncoding(); while (p < end) { int c = codePoint(runtime, enc, bytes, p, end); if (!enc.isPrint(c)) return false; p += codeLength(enc, c); } return true; }