Examples of fastGetClass()


Examples of org.jruby.Ruby.fastGetClass()

    }

    public static Object constructYamlTimestampYMD(final Constructor ctor, final Node node) {
        DateTime dt = (DateTime)(((Object[])SafeConstructorImpl.constructYamlTimestamp(ctor,node))[0]);
        Ruby runtime = ((JRubyConstructor)ctor).runtime;
        return RuntimeHelpers.invoke(runtime.getCurrentContext(), runtime.fastGetClass("Date"), "new", runtime.newFixnum(dt.getYear()),runtime.newFixnum(dt.getMonthOfYear()),runtime.newFixnum(dt.getDayOfMonth()));
    }

    public static Object constructYamlInt(final Constructor ctor, final Node node) {
        return org.jruby.javasupport.JavaUtil.convertJavaToRuby(((JRubyConstructor)ctor).runtime,SafeConstructorImpl.constructYamlInt(ctor,node));
    }
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        }
        javaClass.lockProxy();
        try {
            if ((proxyClass = javaClass.getProxyClass()) == null) {
                RubyModule interfaceModule = getInterfaceModule(runtime, javaClass);
                RubyClass interfaceJavaProxy = runtime.fastGetClass("InterfaceJavaProxy");
                proxyClass = RubyClass.newClass(runtime, interfaceJavaProxy);
                proxyClass.setAllocator(interfaceJavaProxy.getAllocator());
                proxyClass.makeMetaClass(interfaceJavaProxy.getMetaClass());
                // parent.setConstant(name, proxyClass); // where the name should come from ?
                proxyClass.inherit(interfaceJavaProxy);
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        } catch (UnsatisfiedLinkError ule) { }
        if (ret < 0) {
            rb_sys_fail(runtime, "socketpair(2)");
        }

        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock.fd = sp[0];
        sock.init_sock(runtime);
        RubyUNIXSocket sock2 = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock2.fd = sp[1];
        sock2.init_sock(runtime);
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        }

        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock.fd = sp[0];
        sock.init_sock(runtime);
        RubyUNIXSocket sock2 = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock2.fd = sp[1];
        sock2.init_sock(runtime);

        return runtime.newArrayNoCopy(new IRubyObject[]{sock, sock2});
    }
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        if(fd2 < 0) {
            rb_sys_fail(context.getRuntime(), null);
        }

        Ruby runtime = context.getRuntime();
        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
       
        sock.fd = fd2;
        sock.fpath = new String(from.sun_path);

        sock.init_sock(context.getRuntime());
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        if(fd2 < 0) {
            rb_sys_fail(context.getRuntime(), null);
        }

        Ruby runtime = context.getRuntime();
        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
       
        sock.fd = fd2;
        sock.fpath = new String(from.sun_path);

        sock.init_sock(context.getRuntime());
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

            if ( args.length > 2 ) {
                throw runtime.newArgumentError(args.length, 2);
            }

            if (!( args[0] instanceof Mutex )) {
                throw context.getRuntime().newTypeError(args[0], runtime.fastGetClass("Mutex"));
            }
            Mutex mutex = (Mutex)args[0];

            Double timeout = null;
            if ( args.length > 1 && !args[1].isNil() ) {
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        } catch (UnsatisfiedLinkError ule) { }
        if (ret < 0) {
            rb_sys_fail(runtime, "socketpair(2)");
        }

        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock.fd = sp[0];
        sock.init_sock(runtime);
        RubyUNIXSocket sock2 = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock2.fd = sp[1];
        sock2.init_sock(runtime);
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        }

        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock.fd = sp[0];
        sock.init_sock(runtime);
        RubyUNIXSocket sock2 = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
        sock2.fd = sp[1];
        sock2.init_sock(runtime);

        return runtime.newArrayNoCopy(new IRubyObject[]{sock, sock2});
    }
View Full Code Here

Examples of org.jruby.Ruby.fastGetClass()

        if(fd2 < 0) {
            rb_sys_fail(context.getRuntime(), null);
        }

        Ruby runtime = context.getRuntime();
        RubyUNIXSocket sock = (RubyUNIXSocket)(RuntimeHelpers.invoke(context, runtime.fastGetClass("UNIXSocket"), "allocate"));
       
        sock.fd = fd2;
        sock.fpath = from.path().toString();

        sock.init_sock(context.getRuntime());
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.