Examples of exclude_end_p()


Examples of org.jruby.RubyRange.exclude_end_p()

                int last = (int)((RubyFixnum)range.last()).getLongValue();
               
                first = first >= 0 ? first : length + first;
                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);
                }
       
View Full Code Here

Examples of org.jruby.RubyRange.exclude_end_p()

                int last = (int)((RubyFixnum)range.last()).getLongValue();
               
                first = first >= 0 ? first : length + first;
                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);
                }
       
View Full Code Here

Examples of org.jruby.RubyRange.exclude_end_p()

                int last = (int)((RubyFixnum)range.last()).getLongValue();
               
                first = first >= 0 ? first : length + first;
                last = last >= 0 ? last : length + last;
                int newLength = last - first;
                if (range.exclude_end_p().isFalse()) newLength += 1;
               
                if (newLength <= 0) {
                    return ArrayUtils.emptyJavaArrayDirect(context, getObject().getClass().getComponentType());
                }
       
View Full Code Here

Examples of org.jruby.RubyRange.exclude_end_p()

        } else if (index_or_range instanceof RubyRange) {
            RubyRange range = (RubyRange)index_or_range;
            Long start = (Long)range.first(context).toJava(Long.class);
            Long last = (Long)range.last(context).toJava(Long.class);
            // subvec returns from 'start' to element (- end 1)
            if (range.exclude_end_p().isTrue()) {
                return commonAref(context, start, null, last);
            } else {
                return commonAref(context, start, null, last + 1);
            }
        } else {
View Full Code Here

Examples of org.jruby.RubyRange.exclude_end_p()

                int last = (int)((RubyFixnum)range.last(context)).getLongValue();
               
                first = first >= 0 ? first : length + first;
                last = last >= 0 ? last : length + last;
                int newLength = last - first;
                if (range.exclude_end_p().isFalse()) newLength += 1;
               
                if (newLength <= 0) {
                    return ArrayUtils.emptyJavaArrayDirect(context, getObject().getClass().getComponentType());
                }
       
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.