/** rb_ary_initialize_copy * */ @JRubyMethod(name = {"initialize_copy"}, required = 1, visibility=PRIVATE) @Override public IRubyObject initialize_copy(IRubyObject orig) { return this.replace(orig); }
@Override public synchronized IRubyObject replace(IRubyObject orig) { IRubyObject result = super.replace(orig); rehash(); return result; }
/** rb_ary_initialize_copy * */ @JRubyMethod(name = {"initialize_copy"}, required = 1, visibility=PRIVATE) @Override public IRubyObject initialize_copy(IRubyObject orig) { return this.replace(orig); }
@Override public synchronized IRubyObject replace(IRubyObject orig) { IRubyObject result = super.replace(orig); rehash(); return result; }
/** rb_ary_initialize_copy * */ @JRubyMethod(name = {"initialize_copy"}, required = 1, visibility=PRIVATE) @Override public IRubyObject initialize_copy(IRubyObject orig) { return this.replace(orig); }
/** rb_ary_initialize_copy * */ @JRubyMethod(name = {"initialize_copy"}, required = 1, visibility=PRIVATE) @Override public IRubyObject initialize_copy(IRubyObject orig) { return this.replace(orig); }
@Override public synchronized IRubyObject replace(IRubyObject orig) { IRubyObject result = super.replace(orig); rehash(); return result; }
@Override public synchronized IRubyObject replace(IRubyObject orig) { IRubyObject result = super.replace(orig); rehash(); return result; }
/** rb_ary_sort_by_bang * */ @JRubyMethod(name = "sort_by!") public IRubyObject sort_by_bang(ThreadContext context, Block block) { if (!block.isGiven()) return enumeratorizeWithSize(context, this, "sort_by!", enumLengthFn()); modifyCheck(); RubyArray sorted = sites(context).sort_by.call(context, this, this, block).convertToArray(); replace(sorted); return this; }
/** rb_ary_sort_by_bang * */ @JRubyMethod(name = "sort_by!") public IRubyObject sort_by_bang(ThreadContext context, Block block) { if (!block.isGiven()) return enumeratorizeWithSize(context, this, "sort_by!", enumLengthFn()); modifyCheck(); RubyArray sorted = sites(context).sort_by.call(context, this, this, block).convertToArray(); replace(sorted); return this; }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
public static void initARGV(Ruby runtime) { // define ARGV and $* for this runtime RubyArray argvArray = runtime.newArray(); String[] argv = runtime.getInstanceConfig().getArgv(); for (String arg : argv) { argvArray.append(RubyString.newInternalFromJavaExternal(runtime, arg)); } if (runtime.getObject().getConstantNoConstMissing("ARGV") != null) { ((RubyArray)runtime.getObject().getConstant("ARGV")).replace(argvArray); } else { runtime.getObject().setConstantQuiet("ARGV", argvArray); runtime.getGlobalVariables().define("$*", new ValueAccessor(argvArray), GLOBAL); } }
IRubyObject val = arg0.checkArrayType(); if (!val.isNil()) { replace(val); return this;
IRubyObject val = arg0.checkArrayType(); if (!val.isNil()) { replace(val); return this;
IRubyObject val = arg0.checkArrayType(); if (!val.isNil()) { replace(val); return this;
IRubyObject val = arg0.checkArrayType(); if (!val.isNil()) { replace(val); return this;