Package org.jruby.runtime

Examples of org.jruby.runtime.ClassIndex


    }

    private List<Variable<Object>> getVariables(IRubyObject value) throws IOException {
        List<Variable<Object>> variables = null;
        if (value instanceof CoreObjectType) {
            ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();
           
            if (nativeClassIndex != ClassIndex.OBJECT && nativeClassIndex != ClassIndex.BASICOBJECT) {
                if (shouldMarshalEncoding(value) || (
                        !value.isImmediate()
                        && value.hasVariables()
View Full Code Here


        // marshalling logic.
        if (value instanceof CoreObjectType) {
            if (value instanceof DataType) {
                throw value.getRuntime().newTypeError("no marshal_dump is defined for class " + value.getMetaClass().getName());
            }
            ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();

            switch (nativeClassIndex) {
            case ARRAY:
                write('[');
                RubyArray.marshalTo((RubyArray)value, this);
View Full Code Here

        return obj.getRuntime().getNil();
    }

    // rb_check_type and Check_Type
    public static void checkType(ThreadContext context, IRubyObject x, RubyModule t) {
        ClassIndex xt;

        if (x == RubyBasicObject.UNDEF) {
            throw context.runtime.newRuntimeError("bug: undef leaked to the Ruby space");
        }
View Full Code Here

                    if (arg == null || name != null) {
                        arg = args.next(name);
                        name = null;
                    }

                    ClassIndex type = arg.getMetaClass().getClassIndex();
                    if (type != ClassIndex.FIXNUM && type != ClassIndex.BIGNUM) {
                        switch(type) {
                        case FLOAT:
                            arg = RubyNumeric.dbl2num(arg.getRuntime(),((RubyFloat)arg).getValue());
                            break;
View Full Code Here

TOP

Related Classes of org.jruby.runtime.ClassIndex

Copyright © 2018 www.massapicom. 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.