示例#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();
  }
示例#2
0
 public RubyID toID() {
   return RubyID.intern(this.sb_.toString());
 }