Examples of convertToInteger()


Examples of org.jruby.runtime.builtin.IRubyObject.convertToInteger()

        }

        String val = null;

        if (!err.isNil()) {
            errno = err.convertToInteger();
            int errnoVal = RubyNumeric.num2int(errno);
            if (Errno.valueOf(errnoVal) != Errno.__UNKNOWN_CONSTANT__) {
                // we got a valid errno value
                isErrnoClass = true;
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToInteger()

                IRubyObject step;

                if (args != null && args.length > 0) {
                    step = args[0];
                    if (!(step instanceof RubyNumeric)) {
                        step.convertToInteger();
                    }
                } else {
                    step = RubyFixnum.one(runtime);
                }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToInteger()

    private void aggregateDimensions(IRubyObject[] sizes) {
        int[] newDimensions = new int[dimensions.length + sizes.length];
        System.arraycopy(dimensions, 0, newDimensions, 0, dimensions.length);
        for (int i = 0; i < sizes.length; i++) {
            IRubyObject size = sizes[i];
            int intSize = (int) size.convertToInteger().getLongValue();
            newDimensions[i + dimensions.length] = intSize;
        }
        dimensions = newDimensions;
    }
}
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToInteger()

                    return 0;
                }
                throw e;
            }

            return result.isNil() ? 0 : RubyNumeric.num2int(result.convertToInteger());
        }

        /**
         * Wrapper for getTreeNode used by CHM.get. Tries to obtain
         * read-lock to call getTreeNode, but during failure to get
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToInteger()

                if ( autoCommit ) { // do not retry if (inside) transactions
                    if ( i == 0 ) {
                        IRubyObject retryCount = getConfigValue(context, "retry_count");
                        if ( ! retryCount.isNil() ) {
                            retry = (int) retryCount.convertToInteger().getLongValue();
                        }
                    }
                    if ( isConnectionValid(context, connection) ) {
                        break; // connection not broken yet failed (do not retry)
                    }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToInteger()

                    return 0;
                }
                throw e;
            }

            return result.isNil() ? 0 : RubyNumeric.num2int(result.convertToInteger());
        }

        /**
         * Wrapper for getTreeNode used by CHM.get. Tries to obtain
         * read-lock to call getTreeNode, but during failure to get
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.