private static int rlimitResourceType(Ruby runtime, IRubyObject rtype) { String name; IRubyObject v; int r; switch (((CoreObjectType) rtype).getNativeClassIndex()) { case SYMBOL: name = rtype.toString(); break; case STRING: name = rtype.toString(); break; default: v = TypeConverter.checkStringType(runtime, rtype); if (!v.isNil()) { rtype = v; name = rtype.toString(); break; } /* fall through */ case INTEGER: return rtype.convertToInteger().getIntValue(); } r = rlimitTypeByHname(name); if (r != -1) return r; throw runtime.newArgumentError("invalid resource name: " + rtype); }
private List<Variable<Object>> getVariables(IRubyObject value) throws IOException { List<Variable<Object>> variables = null; if (value instanceof CoreObjectType) { int nativeTypeIndex = ((CoreObjectType)value).getNativeTypeIndex();
private List<Variable<Object>> getVariables(IRubyObject value) throws IOException { List<Variable<Object>> variables = null; if (value instanceof CoreObjectType) { int nativeTypeIndex = ((CoreObjectType)value).getNativeTypeIndex();
private static int rlimitResourceType(Ruby runtime, IRubyObject rtype) { String name; IRubyObject v; int r; switch (((CoreObjectType) rtype).getNativeClassIndex()) { case SYMBOL: name = rtype.toString(); break; case STRING: name = rtype.toString(); break; default: v = TypeConverter.checkStringType(runtime, rtype); if (!v.isNil()) { rtype = v; name = rtype.toString(); break; } /* fall through */ case INTEGER: return rtype.convertToInteger().getIntValue(); } r = rlimitTypeByHname(name); if (r != -1) return r; throw runtime.newArgumentError("invalid resource name: " + rtype); }
throw value.getRuntime().newTypeError("no marshal_dump is defined for class " + value.getMetaClass().getName()); int nativeTypeIndex = ((CoreObjectType)value).getNativeTypeIndex();
IRubyObject v; switch (((CoreObjectType) rval).getNativeClassIndex()) { case SYMBOL: name = rval.toString();
throw value.getRuntime().newTypeError("no marshal_dump is defined for class " + value.getMetaClass().getName()); int nativeTypeIndex = ((CoreObjectType)value).getNativeTypeIndex();
IRubyObject v; switch (((CoreObjectType) rval).getNativeClassIndex()) { case SYMBOL: name = rval.toString();
private List<Variable<Object>> getVariables(IRubyObject value) throws IOException { List<Variable<Object>> variables = null; if (value instanceof CoreObjectType) { ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();
private List<Variable<Object>> getVariables(IRubyObject value) throws IOException { List<Variable<Object>> variables = null; if (value instanceof CoreObjectType) { ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();
ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();
ClassIndex nativeClassIndex = ((CoreObjectType)value).getNativeClassIndex();