Ejemplo n.º 1
0
  // @RubyLevelMethod(name="intern", alias="to_sym")
  public RubySymbol intern() {
    if (this.sb_.length() <= 0) {
      throw new RubyException(RubyRuntime.ArgumentErrorClass, "interning empty string");
    }

    RubyID id = RubyID.intern(this.sb_.toString());
    return id.toSymbol();
  }
Ejemplo n.º 2
0
 public RubyID toID() {
   return RubyID.intern(this.sb_.toString());
 }