@Override public IRubyObject set(IRubyObject value) { runtime.setKCode(KCode.create(value.convertToString().toString())); return value; } }
@Override public IRubyObject set(IRubyObject value) { runtime.setKCode(KCode.create(value.convertToString().toString())); return value; } }
@Override public IRubyObject set(IRubyObject value) { runtime.setKCode(KCode.create(runtime, value.convertToString().toString())); return value; } }
@Override public IRubyObject set(IRubyObject value) { runtime.setKCode(KCode.create(runtime, value.convertToString().toString())); return value; } }
/** rb_reg_s_quote * */ @JRubyMethod(name = {"quote", "escape"}, required = 1, optional = 1, meta = true, compat = CompatVersion.RUBY1_8) public static RubyString quote(ThreadContext context, IRubyObject recv, IRubyObject[] args) { Ruby runtime = context.runtime; final KCode code; if (args.length == 1 || args[1].isNil()) { code = runtime.getKCode(); } else { code = KCode.create(runtime, args[1].toString()); } RubyString src = args[0].convertToString(); RubyString dst = RubyString.newStringShared(runtime, quote(src.getByteList(), code.getEncoding())); dst.infectBy(src); return dst; }
/** rb_reg_s_quote * */ @JRubyMethod(name = {"quote", "escape"}, required = 1, optional = 1, meta = true, compat = CompatVersion.RUBY1_8) public static RubyString quote(ThreadContext context, IRubyObject recv, IRubyObject[] args) { Ruby runtime = context.runtime; final KCode code; if (args.length == 1 || args[1].isNil()) { code = runtime.getKCode(); } else { code = KCode.create(runtime, args[1].toString()); } RubyString src = args[0].convertToString(); RubyString dst = RubyString.newStringShared(runtime, quote(src.getByteList(), code.getEncoding())); dst.infectBy(src); return dst; }
String eArg = grabValue(getArgumentError("provide a value for -K")); config.setKCode(KCode.create(eArg));
config.setKCode(KCode.create(null, eArg));
config.setKCode(KCode.create(null, eArg));
String eArg = grabValue(getArgumentError("provide a value for -K")); config.setKCode(KCode.create(eArg));