Arity.checkArgumentCount(runtime, args, 0, 1);
if (args.length > 0) {
size = args[0];
args = Arrays.copyOfRange(args, 1, args.length);
if (!(size.isNil() || size.respondsTo("call")) &&
!(runtime.getFloat().isInstance(size) && ((RubyFloat)size).getDoubleValue() == Float.POSITIVE_INFINITY) &&
!(size instanceof RubyInteger)) {
throw runtime.newTypeError(size, runtime.getInteger());
}
}