Package org.jruby

Examples of org.jruby.RubyArray.aset()


            if(oo instanceof LinkNode) {
                arr.append(runtime.getNil());
                final IRubyObject ix = runtime.newFixnum(i);
                addFixer((Node)(((LinkNode)oo).getValue()), new RecursiveFixer() {
                        public void replace(Node node, Object real) {
                            arr.aset(ix, (IRubyObject)real);
                        }
                    });
            } else {
                arr.append((IRubyObject)oo);
            }
View Full Code Here


    @Override
    public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1) {
        Ruby runtime = context.getRuntime();
        if (self.getMetaClass() == runtime.getArray()) {
            RubyArray array = (RubyArray)self;
            return array.aset(arg0, arg1);
        }
        return super.call(context, caller, self, arg0, arg1);
    }
}
View Full Code Here

    @Override
    public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1) {
        Ruby runtime = context.runtime;
        if (self.getMetaClass() == runtime.getArray()) {
            RubyArray array = (RubyArray)self;
            return array.aset(arg0, arg1);
        }
        return super.call(context, caller, self, arg0, arg1);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.