Examples of eltOk()


Examples of org.jruby.RubyArray.eltOk()

            if(template.isNil()) {
                template = runtime.getClassFromPath("OpenSSL::X509::Name").getConstant("OBJECT_TYPE_TEMPLATE");
            }

            for (int i = 0; i < ary.size(); i++) {
                IRubyObject obj = ary.eltOk(i);

                if (!(obj instanceof RubyArray)) {
                    throw runtime.newTypeError(obj, runtime.getArray());
                }
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

                }

                RubyArray arr = (RubyArray)obj;

                IRubyObject entry0, entry1, entry2;
                entry0 = arr.size() > 0 ? arr.eltOk(0) : context.nil;
                entry1 = arr.size() > 1 ? arr.eltOk(1) : context.nil;
                entry2 = arr.size() > 2 ? arr.eltOk(2) : context.nil;

                if (entry2.isNil()) entry2 = template.callMethod(context, "[]", entry0);
                if (entry2.isNil()) entry2 = runtime.getClassFromPath("OpenSSL::X509::Name").getConstant("DEFAULT_OBJECT_TYPE");
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

                RubyArray arr = (RubyArray)obj;

                IRubyObject entry0, entry1, entry2;
                entry0 = arr.size() > 0 ? arr.eltOk(0) : context.nil;
                entry1 = arr.size() > 1 ? arr.eltOk(1) : context.nil;
                entry2 = arr.size() > 2 ? arr.eltOk(2) : context.nil;

                if (entry2.isNil()) entry2 = template.callMethod(context, "[]", entry0);
                if (entry2.isNil()) entry2 = runtime.getClassFromPath("OpenSSL::X509::Name").getConstant("DEFAULT_OBJECT_TYPE");
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

                RubyArray arr = (RubyArray)obj;

                IRubyObject entry0, entry1, entry2;
                entry0 = arr.size() > 0 ? arr.eltOk(0) : context.nil;
                entry1 = arr.size() > 1 ? arr.eltOk(1) : context.nil;
                entry2 = arr.size() > 2 ? arr.eltOk(2) : context.nil;

                if (entry2.isNil()) entry2 = template.callMethod(context, "[]", entry0);
                if (entry2.isNil()) entry2 = runtime.getClassFromPath("OpenSSL::X509::Name").getConstant("DEFAULT_OBJECT_TYPE");

                add_entry(context, entry0, entry1, entry2);
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

    }

    private static RubyArray mapToPathnames(ThreadContext context, RubyClass clazz, IRubyObject ary) {
        RubyArray paths = ary.convertToArray();
        for (int i = 0; i < paths.size(); i++) {
            RubyString path = paths.eltOk(i).convertToString();
            paths.store(i, newInstance(context, clazz, path));
        }
        return paths;
    }
}
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

        for (Operand arg : args) {
            IRubyObject rArg = (IRubyObject) arg.retrieve(context, self, currScope, currDynScope, temp);
            if (arg instanceof Splat) {
                RubyArray array = (RubyArray) rArg;
                for (int i = 0; i < array.size(); i++) {
                    argList.add(array.eltOk(i));
                }
            } else {
                argList.add(rArg);
            }
        }
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

        RubyArray readAry = null;
        if (!read.isNil()) {
            readAry = read.convertToArray();
            for (i = 0; i < readAry.size(); i++) {
                fptr = TypeConverter.ioGetIO(runtime, readAry.eltOk(i)).getOpenFileChecked();
                fdSetRead(context, fptr.fd(), readAry.size());
                if (fptr.READ_DATA_PENDING() || fptr.READ_CHAR_PENDING()) { /* check for buffered data */
                    if (pendingReadFDs == null) pendingReadFDs = new ArrayList(1);
                    pendingReadFDs.add(fptr.fd());
                }
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

        RubyArray writeAry = null;
        if (!write.isNil()) {
            writeAry = write.convertToArray();
            for (i = 0; i < writeAry.size(); i++) {
                RubyIO write_io = TypeConverter.ioGetIO(runtime, writeAry.eltOk(i)).GetWriteIO();
                fptr = write_io.getOpenFileChecked();
                fdSetWrite(context, fptr.fd(), writeAry.size());
            }
        }
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

        if (!except.isNil()) {
            // This does not actually register anything because we do not have a way to select for error on JDK.
            // We make the calls for their side effects.
            exceptAry = except.convertToArray();
            for (i = 0; i < exceptAry.size(); i++) {
                RubyIO io = TypeConverter.ioGetIO(runtime, exceptAry.eltOk(i));
                RubyIO write_io = io.GetWriteIO();
                fptr = io.getOpenFileChecked();
                if (io != write_io) {
                    fptr = write_io.getOpenFileChecked();
                }
View Full Code Here

Examples of org.jruby.RubyArray.eltOk()

        }

        if (errorKeyList != null) {
            list = (RubyArray) res.eltOk(2);
            for (i = 0; i < exceptAry.size(); i++) {
                IRubyObject obj = exceptAry.eltOk(i);
                RubyIO io = TypeConverter.ioGetIO(runtime, obj);
                RubyIO write_io = io.GetWriteIO();
                fptr = io.getOpenFileChecked();
                if (errorKeyList.contains(fptr.fd())) {
                    list.push(obj);
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.