Examples of emptyJavaArray()


Examples of org.jruby.javasupport.JavaClass.emptyJavaArray()

                last = last >= 0 ? last : length + last;
                int newLength = last - first;
                if (range.exclude_end_p().isFalse()) newLength += 1;
               
                if (newLength <= 0) {
                    return arrayClass.emptyJavaArray(context);
                }
       
                return arrayClass.javaArraySubarray(context, getJavaArray(), first, newLength);
            } else {
                throw context.getRuntime().newTypeError("only Fixnum ranges supported");
View Full Code Here

Examples of org.jruby.javasupport.JavaClass.emptyJavaArray()

            }

            first = first >= 0 ? first : (int)getJavaArray().length().getLongValue() + first;

            if (length <= 0) {
                return arrayClass.emptyJavaArray(context);
            }

            return arrayClass.javaArraySubarray(context, getJavaArray(), first, length);
        } else {
            throw context.getRuntime().newTypeError("only Fixnum ranges supported");
View Full Code Here

Examples of org.jruby.javasupport.JavaClass.emptyJavaArray()

                last = last >= 0 ? last : length + last;
                int newLength = last - first;
                if (range.exclude_end_p().isFalse()) newLength += 1;
               
                if (newLength <= 0) {
                    return arrayClass.emptyJavaArray(context);
                }
       
                return arrayClass.javaArraySubarray(context, getJavaArray(), first, newLength);
            } else {
                throw context.getRuntime().newTypeError("only Fixnum ranges supported");
View Full Code Here

Examples of org.jruby.javasupport.JavaClass.emptyJavaArray()

            }

            first = first >= 0 ? first : (int)getJavaArray().length().getLongValue() + first;

            if (length <= 0) {
                return arrayClass.emptyJavaArray(context);
            }

            return arrayClass.javaArraySubarray(context, getJavaArray(), first, length);
        } else {
            throw context.getRuntime().newTypeError("only Fixnum ranges supported");
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.