Examples of newEmptyArray()


Examples of org.jruby.Ruby.newEmptyArray()

                urlStrings.add(runtime.newString(urlString));
            }
            return RubyArray.newArrayNoCopy(runtime, urlStrings.toArray(new IRubyObject[urlStrings.size()]));
        } catch (IOException ignore) {
        }
        return runtime.newEmptyArray();
    }

    public static class StringUtils {
        @JRubyMethod
        public static IRubyObject unseeded_hash(ThreadContext context, IRubyObject recv) {
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

   
    @JRubyMethod
    public static IRubyObject dimensions(ThreadContext context, IRubyObject maybeArray) {
        Ruby runtime = context.runtime;
        if (!(maybeArray instanceof RubyArray)) {
            return runtime.newEmptyArray();
        }
        RubyArray rubyArray = (RubyArray)maybeArray;
        RubyArray dims = runtime.newEmptyArray();
       
        return dimsRecurse(context, rubyArray, dims, 0);
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

        Ruby runtime = context.runtime;
        if (!(maybeArray instanceof RubyArray)) {
            return runtime.newEmptyArray();
        }
        RubyArray rubyArray = (RubyArray)maybeArray;
        RubyArray dims = runtime.newEmptyArray();
       
        return dimsRecurse(context, rubyArray, dims, 0);
    }
   
    @JRubyMethod
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

   
    @JRubyMethod
    public static IRubyObject dimensions(ThreadContext context, IRubyObject maybeArray, IRubyObject dims) {
        Ruby runtime = context.runtime;
        if (!(maybeArray instanceof RubyArray)) {
            return runtime.newEmptyArray();
        }
        assert dims instanceof RubyArray;
       
        RubyArray rubyArray = (RubyArray)maybeArray;
       
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

   
    @JRubyMethod
    public static IRubyObject dimensions(ThreadContext context, IRubyObject maybeArray, IRubyObject dims, IRubyObject index) {
        Ruby runtime = context.runtime;
        if (!(maybeArray instanceof RubyArray)) {
            return runtime.newEmptyArray();
        }
        assert dims instanceof RubyArray;
        assert index instanceof RubyFixnum;
       
        RubyArray rubyArray = (RubyArray)maybeArray;
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

    public IRubyObject attribute_nodes(ThreadContext context) {
        NamedNodeMap nodeMap = this.node.getAttributes();

        Ruby ruby = context.getRuntime();
        if(nodeMap == null){
            return ruby.newEmptyArray();
        }

        RubyArray attr = ruby.newArray();

        for(int i = 0; i < nodeMap.getLength(); i++) {
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

    }
   
    static XmlSchema createSchemaInstance(ThreadContext context, RubyClass klazz, Source source) {
        Ruby runtime = context.getRuntime();
        XmlRelaxng xmlRelaxng = (XmlRelaxng) NokogiriService.XML_RELAXNG_ALLOCATOR.allocate(runtime, klazz);
        xmlRelaxng.setInstanceVariable("@errors", runtime.newEmptyArray());
       
        try {
            Schema schema = xmlRelaxng.getSchema(source, context);
            xmlRelaxng.setVerifier(schema.newVerifier());
            return xmlRelaxng;
View Full Code Here

Examples of org.jruby.Ruby.newEmptyArray()

    }

    static XmlSchema createSchemaInstance(ThreadContext context, RubyClass klazz, Source source) {
        Ruby runtime = context.getRuntime();
        XmlSchema xmlSchema = (XmlSchema) NokogiriService.XML_SCHEMA_ALLOCATOR.allocate(runtime, klazz);
        xmlSchema.setInstanceVariable("@errors", runtime.newEmptyArray());
       
        try {
            Schema schema = xmlSchema.getSchema(source, context.getRuntime().getCurrentDirectory(), context.getRuntime().getInstanceConfig().getScriptFileName());
            xmlSchema.setValidator(schema.newValidator());
            return xmlSchema;
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.