diff --git a/core/src/main/java/org/jruby/RubyArgsFile.java b/core/src/main/java/org/jruby/RubyArgsFile.java
index 8fab9c186dc..5d3d670bb84 100644
--- a/core/src/main/java/org/jruby/RubyArgsFile.java
+++ b/core/src/main/java/org/jruby/RubyArgsFile.java
@@ -405,7 +405,7 @@ private static boolean isGenericInput(Ruby runtime, ArgsFileData data) {
/** Read a line.
*
*/
- @JRubyMethod(name = "gets", optional = 1, writes = LASTLINE)
+ @JRubyMethod(name = "gets", optional = 1, checkArity = false, writes = LASTLINE)
public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -415,7 +415,7 @@ public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObj
/** Read a line.
*
*/
- @JRubyMethod(name = "readline", optional = 1, writes = LASTLINE)
+ @JRubyMethod(name = "readline", optional = 1, checkArity = false, writes = LASTLINE)
public static IRubyObject readline(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
IRubyObject line = gets(context, recv, args);
@@ -424,7 +424,7 @@ public static IRubyObject readline(ThreadContext context, IRubyObject recv, IRub
return line;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -443,7 +443,7 @@ public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRu
return ary;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject to_a(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -478,7 +478,7 @@ public static IRubyObject each_byte(final ThreadContext context, IRubyObject rec
return block.isGiven() ? each_byte(context, recv, block) : enumeratorize(context.runtime, recv, "each_byte");
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject bytes(final ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block) {
Arity.checkArgumentCount(context, args, 0, 1);
return block.isGiven() ? each_byte(context, recv, block) : enumeratorize(context.runtime, recv, "bytes");
@@ -555,7 +555,7 @@ public static IRubyObject codepoints(ThreadContext context, IRubyObject recv, Bl
/** Invoke a block for each line.
*
*/
- @JRubyMethod(name = "each_line", optional = 1)
+ @JRubyMethod(name = "each_line", optional = 1, checkArity = false)
public static IRubyObject each_line(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
if (!block.isGiven()) return enumeratorize(context.runtime, recv, "each_line", args);
@@ -581,7 +581,7 @@ public static IRubyObject each_line(ThreadContext context, IRubyObject recv, IRu
}
@Deprecated // TODO "warning: ARGF#lines is deprecated; use #each_line instead"
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject lines(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
if (!block.isGiven()) return RubyEnumerator.enumeratorize(context.runtime, recv, "each_line");
return each_line(context, recv, args, block);
@@ -592,7 +592,7 @@ public static IRubyObject each_line19(final ThreadContext context, IRubyObject r
return each_line(context, recv, args, block);
}
- @JRubyMethod(name = "each", optional = 1)
+ @JRubyMethod(name = "each", optional = 1, checkArity = false)
public static IRubyObject each(final ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block) {
return block.isGiven() ? each_line(context, recv, args, block) : enumeratorize(context.runtime, recv, "each", args);
}
@@ -737,7 +737,7 @@ public static IRubyObject set_pos(ThreadContext context, IRubyObject recv, IRuby
return getCurrentDataFile(context, "no stream to set position").pos_set(context, offset);
}
- @JRubyMethod(name = "seek", required = 1, optional = 1)
+ @JRubyMethod(name = "seek", required = 1, optional = 1, checkArity = false)
public static IRubyObject seek(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -774,14 +774,14 @@ public static IRubyObject getbyte(ThreadContext context, IRubyObject recv) {
}
}
- @JRubyMethod(required = 1, optional = 2)
+ @JRubyMethod(required = 1, optional = 2, checkArity = false)
public static IRubyObject read_nonblock(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 3);
return getPartial(context, recv, args, true);
}
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public static IRubyObject readpartial(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -860,7 +860,7 @@ public static IRubyObject getc(ThreadContext context, IRubyObject recv) {
}
}
- @JRubyMethod(name = "read", optional = 2)
+ @JRubyMethod(name = "read", optional = 2, checkArity = false)
public static IRubyObject read(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 2);
diff --git a/core/src/main/java/org/jruby/RubyArray.java b/core/src/main/java/org/jruby/RubyArray.java
index 137b21f26cc..7ccf5f2e2ec 100644
--- a/core/src/main/java/org/jruby/RubyArray.java
+++ b/core/src/main/java/org/jruby/RubyArray.java
@@ -1178,7 +1178,7 @@ public IRubyObject insert19(IRubyObject arg1, IRubyObject arg2) {
return insert(arg1, arg2);
}
- @JRubyMethod(name = "insert", required = 1, rest = true)
+ @JRubyMethod(name = "insert", required = 1, rest = true, checkArity = false)
public IRubyObject insert(IRubyObject[] args) {
final Ruby runtime = metaClass.runtime;
@@ -2687,7 +2687,7 @@ public IRubyObject indexes(IRubyObject[] args) {
/** rb_ary_indexes
*
*/
- @JRubyMethod(name = {"indexes", "indices"}, required = 1, rest = true)
+ @JRubyMethod(name = {"indexes", "indices"}, required = 1, rest = true, checkArity = false)
public IRubyObject indexes(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -3126,7 +3126,7 @@ public IRubyObject delete_if(ThreadContext context, Block block) {
/** rb_ary_zip
*
*/
- @JRubyMethod(optional = 1, rest = true)
+ @JRubyMethod(optional = 1, rest = true, checkArity = false)
public IRubyObject zip(ThreadContext context, IRubyObject[] args, Block block) {
final Ruby runtime = context.runtime;
RubyClass array = runtime.getArray();
@@ -5487,7 +5487,7 @@ public IRubyObject dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1
return RubyObject.dig2(context, val, arg1, arg2);
}
- @JRubyMethod(name = "dig", required = 1, rest = true)
+ @JRubyMethod(name = "dig", required = 1, rest = true, checkArity = false)
public IRubyObject dig(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/RubyBasicObject.java b/core/src/main/java/org/jruby/RubyBasicObject.java
index dcd113db8e7..0d42209b243 100644
--- a/core/src/main/java/org/jruby/RubyBasicObject.java
+++ b/core/src/main/java/org/jruby/RubyBasicObject.java
@@ -1678,7 +1678,7 @@ public IRubyObject send(ThreadContext context, IRubyObject arg0, IRubyObject arg
return getMetaClass().finvokeWithRefinements(context, this, staticScope, name, arg1, arg2, block);
}
- @JRubyMethod(name = "__send__", required = 1, rest = true, omit = true, keywords = true)
+ @JRubyMethod(name = "__send__", required = 1, rest = true, checkArity = false, omit = true, keywords = true)
public IRubyObject send(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
int callInfo = context.callInfo;
@@ -2594,7 +2594,7 @@ public IRubyObject instance_eval19(ThreadContext context, IRubyObject arg0, IRub
* k = Klass.new
* k.instance_exec(5) {|x| {@literal @}secret+x } #=> 104
*/
- @JRubyMethod(name = "instance_exec", optional = 3, rest = true, keywords = true,
+ @JRubyMethod(name = "instance_exec", rest = true, keywords = true,
reads = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE},
writes = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE})
public IRubyObject instance_exec(ThreadContext context, IRubyObject[] args, Block block) {
diff --git a/core/src/main/java/org/jruby/RubyBinding.java b/core/src/main/java/org/jruby/RubyBinding.java
index e06031cb4b1..8ef899bc5b3 100644
--- a/core/src/main/java/org/jruby/RubyBinding.java
+++ b/core/src/main/java/org/jruby/RubyBinding.java
@@ -117,7 +117,7 @@ public IRubyObject initialize_copy(IRubyObject other) {
}
// c: bind_eval
- @JRubyMethod(name = "eval", required = 1, optional = 2)
+ @JRubyMethod(name = "eval", required = 1, optional = 2, checkArity = false)
public IRubyObject eval(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
diff --git a/core/src/main/java/org/jruby/RubyComplex.java b/core/src/main/java/org/jruby/RubyComplex.java
index f3fcc2ed85b..950aa62615d 100644
--- a/core/src/main/java/org/jruby/RubyComplex.java
+++ b/core/src/main/java/org/jruby/RubyComplex.java
@@ -397,7 +397,7 @@ private static IRubyObject f_complex_polar(ThreadContext context, RubyClass claz
/** nucomp_s_polar
*
*/
- @JRubyMethod(name = "polar", meta = true, required = 1, optional = 1)
+ @JRubyMethod(name = "polar", meta = true, required = 1, optional = 1, checkArity = false)
public static IRubyObject polar(ThreadContext context, IRubyObject clazz, IRubyObject... args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -1177,7 +1177,7 @@ public IRubyObject to_r(ThreadContext context) {
/** nucomp_rationalize
*
*/
- @JRubyMethod(name = "rationalize", optional = 1)
+ @JRubyMethod(name = "rationalize", optional = 1, checkArity = false)
public IRubyObject rationalize(ThreadContext context, IRubyObject[] args) {
if (k_inexact_p(image) || !f_zero_p(context, image)) {
throw context.runtime.newRangeError("can't convert " + f_to_s(context, this).convertToString() + " into Rational");
diff --git a/core/src/main/java/org/jruby/RubyConverter.java b/core/src/main/java/org/jruby/RubyConverter.java
index e2d72d9e5db..b9662d0ee22 100644
--- a/core/src/main/java/org/jruby/RubyConverter.java
+++ b/core/src/main/java/org/jruby/RubyConverter.java
@@ -135,7 +135,7 @@ public RubyConverter(Ruby runtime) {
super(runtime, runtime.getConverter());
}
- @JRubyMethod(visibility = PRIVATE, required = 1, optional = 2)
+ @JRubyMethod(visibility = PRIVATE, required = 1, optional = 2, checkArity = false)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
@@ -221,7 +221,7 @@ public IRubyObject destination_encoding(ThreadContext context) {
}
// econv_primitive_convert
- @JRubyMethod(required = 2, optional = 4)
+ @JRubyMethod(required = 2, optional = 4, checkArity = false)
public IRubyObject primitive_convert(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 6);
@@ -524,7 +524,7 @@ public IRubyObject primitive_errinfo(ThreadContext context) {
return ary;
}
- @JRubyMethod(meta = true, required = 2, optional = 1)
+ @JRubyMethod(meta = true, required = 2, optional = 1, checkArity = false)
public static IRubyObject search_convpath(ThreadContext context, IRubyObject self, IRubyObject[] argv) {
final Ruby runtime = context.runtime;
final IRubyObject nil = context.nil;
@@ -596,7 +596,7 @@ public IRubyObject insert_output(ThreadContext context, IRubyObject string) {
}
// econv_putback
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject putback(ThreadContext context, IRubyObject[] argv)
{
int argc = Arity.checkArgumentCount(context, argv, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyDir.java b/core/src/main/java/org/jruby/RubyDir.java
index a611ec9c49f..f091c0f0bc2 100644
--- a/core/src/main/java/org/jruby/RubyDir.java
+++ b/core/src/main/java/org/jruby/RubyDir.java
@@ -319,7 +319,7 @@ private static ByteList globArgumentAsByteList(ThreadContext context, IRubyObjec
* with each filename is passed to the block in turn. In this case, Nil is
* returned.
*/
- @JRubyMethod(required = 1, optional = 2, meta = true)
+ @JRubyMethod(required = 1, optional = 2, checkArity = false, meta = true)
public static IRubyObject glob(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 1, 3);
@@ -434,7 +434,7 @@ private static void checkDirIsTwoSlashesOnWindows(Ruby runtime, String path) {
}
/** Changes the current directory to path
*/
- @JRubyMethod(optional = 1, meta = true)
+ @JRubyMethod(optional = 1, checkArity = false, meta = true)
public static IRubyObject chdir(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
Ruby runtime = context.runtime;
@@ -652,7 +652,7 @@ public static IRubyObject home(ThreadContext context, IRubyObject recv, IRubyObj
* mode
parameter is provided only to support existing Ruby
* code, and is ignored.
*/
- @JRubyMethod(name = "mkdir", required = 1, optional = 1, meta = true)
+ @JRubyMethod(name = "mkdir", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject mkdir(ThreadContext context, IRubyObject recv, IRubyObject... args) {
Arity.checkArgumentCount(context, args, 1, 2);
Ruby runtime = context.runtime;
diff --git a/core/src/main/java/org/jruby/RubyEnumerator.java b/core/src/main/java/org/jruby/RubyEnumerator.java
index 7b6d4056d30..c6a5e78302c 100644
--- a/core/src/main/java/org/jruby/RubyEnumerator.java
+++ b/core/src/main/java/org/jruby/RubyEnumerator.java
@@ -202,7 +202,7 @@ public static IRubyObject enumeratorize(Ruby runtime, RubyClass type, IRubyObjec
// used internally to create lazy without block (from Enumerator/Enumerable)
// and used internally to create enum from Enumerator::Lazy#eager
- @JRubyMethod(name = "__from", meta = true, required = 2, optional = 2, visibility = PRIVATE, keywords = true)
+ @JRubyMethod(name = "__from", meta = true, required = 2, optional = 2, checkArity = false, visibility = PRIVATE, keywords = true)
public static IRubyObject __from(ThreadContext context, IRubyObject klass, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 4);
@@ -570,7 +570,7 @@ private static JavaSites.FiberSites sites(ThreadContext context) {
/** MRI: enumerator_s_produce
*
*/
- @JRubyMethod(meta = true, optional = 1)
+ @JRubyMethod(meta = true, optional = 1, checkArity = false)
public static IRubyObject produce(ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyException.java b/core/src/main/java/org/jruby/RubyException.java
index 6afc640b8e4..2a827914d6c 100644
--- a/core/src/main/java/org/jruby/RubyException.java
+++ b/core/src/main/java/org/jruby/RubyException.java
@@ -124,7 +124,7 @@ public RubyException(Ruby runtime, RubyClass rubyClass, String message) {
this.setMessage(message == null ? runtime.getNil() : runtime.newString(message));
}
- @JRubyMethod(name = "exception", optional = 1, rest = true, meta = true)
+ @JRubyMethod(name = "exception", rest = true, meta = true)
public static IRubyObject exception(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
return ((RubyClass) recv).newInstance(context, args, block);
}
@@ -291,7 +291,7 @@ public IRubyObject backtrace_locations(ThreadContext context) {
return backtrace.backtraceLocations = backtrace.generateBacktraceLocations(context);
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public RubyException exception(IRubyObject[] args) {
switch (args.length) {
case 0 :
diff --git a/core/src/main/java/org/jruby/RubyFile.java b/core/src/main/java/org/jruby/RubyFile.java
index 1662b27244b..41bf2e952be 100644
--- a/core/src/main/java/org/jruby/RubyFile.java
+++ b/core/src/main/java/org/jruby/RubyFile.java
@@ -341,7 +341,7 @@ public IRubyObject flock(ThreadContext context, IRubyObject operation) {
}
// rb_file_initialize
- @JRubyMethod(name = "initialize", required = 1, optional = 3, visibility = PRIVATE)
+ @JRubyMethod(name = "initialize", required = 1, optional = 3, checkArity = false, visibility = PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 4);
@@ -625,7 +625,7 @@ private static int getAltSeparatorChar(final RubyClass File) {
return NULL_CHAR;
}
- @JRubyMethod(required = 2, rest = true, meta = true)
+ @JRubyMethod(required = 2, rest = true, checkArity = false, meta = true)
public static IRubyObject chmod(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, -1);
@@ -650,7 +650,7 @@ public static IRubyObject chmod(ThreadContext context, IRubyObject recv, IRubyOb
return runtime.newFixnum(count);
}
- @JRubyMethod(required = 2, rest = true, meta = true)
+ @JRubyMethod(required = 2, rest = true, checkArity = false, meta = true)
public static IRubyObject chown(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, -1);
Ruby runtime = context.runtime;
@@ -682,7 +682,7 @@ public static IRubyObject chown(ThreadContext context, IRubyObject recv, IRubyOb
return runtime.newFixnum(count);
}
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject dirname(ThreadContext context, IRubyObject recv, IRubyObject [] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -897,7 +897,7 @@ public static IRubyObject extname(ThreadContext context, IRubyObject recv, IRuby
* @param args
* @return Resulting absolute path as a String
*/
- @JRubyMethod(name = "expand_path", required = 1, optional = 1, meta = true)
+ @JRubyMethod(name = "expand_path", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject expand_path(ThreadContext context, IRubyObject recv, IRubyObject... args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -929,7 +929,7 @@ public static IRubyObject expand_path19(ThreadContext context, IRubyObject recv,
* @param args
* @return
*/
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject absolute_path(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -944,7 +944,7 @@ public static IRubyObject absolute_path_p(ThreadContext context, IRubyObject rec
return context.runtime.newBoolean(isJRubyAbsolutePath(file.asJavaString()));
}
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject realdirpath(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -993,7 +993,7 @@ public static IRubyObject realpath(ThreadContext context, IRubyObject recv, IRub
* [set]: Matches a single char in a set (re: [...]).
*
*/
- @JRubyMethod(name = {"fnmatch", "fnmatch?"}, required = 2, optional = 1, meta = true)
+ @JRubyMethod(name = {"fnmatch", "fnmatch?"}, required = 2, optional = 1, checkArity = false, meta = true)
public static IRubyObject fnmatch(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 3);
@@ -1082,7 +1082,7 @@ public static IRubyObject birthtime(ThreadContext context, IRubyObject recv, IRu
return runtime.newFileStat(f, false).birthtime();
}
- @JRubyMethod(required = 1, rest = true, meta = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, meta = true)
public static IRubyObject lchmod(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -1102,7 +1102,7 @@ public static IRubyObject lchmod(ThreadContext context, IRubyObject recv, IRubyO
return runtime.newFixnum(count);
}
- @JRubyMethod(required = 2, rest = true, meta = true)
+ @JRubyMethod(required = 2, rest = true, checkArity = false, meta = true)
public static IRubyObject lchown(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, -1);
@@ -1261,7 +1261,7 @@ public static IRubyObject truncate19(ThreadContext context, IRubyObject recv, IR
return truncateCommon(context, recv, path, arg2);
}
- @JRubyMethod(meta = true, optional = 1)
+ @JRubyMethod(meta = true, optional = 1, checkArity = false)
public static IRubyObject umask(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -1279,7 +1279,7 @@ public static IRubyObject umask(ThreadContext context, IRubyObject recv, IRubyOb
return runtime.newFixnum(oldMask);
}
- @JRubyMethod(required = 2, rest = true, meta = true)
+ @JRubyMethod(required = 2, rest = true, checkArity = false, meta = true)
public static IRubyObject lutime(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, -1);
@@ -1310,7 +1310,7 @@ public static IRubyObject lutime(ThreadContext context, IRubyObject recv, IRubyO
return runtime.newFixnum(argc - 2);
}
- @JRubyMethod(required = 2, rest = true, meta = true)
+ @JRubyMethod(required = 2, rest = true, checkArity = false, meta = true)
public static IRubyObject utime(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, -1);
diff --git a/core/src/main/java/org/jruby/RubyFloat.java b/core/src/main/java/org/jruby/RubyFloat.java
index dec6f2ea247..bf0ba8c05c0 100644
--- a/core/src/main/java/org/jruby/RubyFloat.java
+++ b/core/src/main/java/org/jruby/RubyFloat.java
@@ -812,7 +812,7 @@ public IRubyObject to_r(ThreadContext context) {
/** float_rationalize
*
*/
- @JRubyMethod(name = "rationalize", optional = 1)
+ @JRubyMethod(name = "rationalize", optional = 1, checkArity = false)
public IRubyObject rationalize(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyGC.java b/core/src/main/java/org/jruby/RubyGC.java
index f751992a3a0..f5630f964a5 100644
--- a/core/src/main/java/org/jruby/RubyGC.java
+++ b/core/src/main/java/org/jruby/RubyGC.java
@@ -67,14 +67,14 @@ public static RubyModule createGCModule(Ruby runtime) {
return result;
}
- @JRubyMethod(module = true, visibility = PRIVATE, optional = 1)
+ @JRubyMethod(module = true, visibility = PRIVATE, optional = 1, checkArity = false)
public static IRubyObject start(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
return context.nil;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject garbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
return context.nil;
diff --git a/core/src/main/java/org/jruby/RubyGenerator.java b/core/src/main/java/org/jruby/RubyGenerator.java
index 08af2e50869..3a4f1d914ce 100644
--- a/core/src/main/java/org/jruby/RubyGenerator.java
+++ b/core/src/main/java/org/jruby/RubyGenerator.java
@@ -54,7 +54,7 @@ public RubyGenerator(Ruby runtime, RubyClass klass) {
}
// generator_initialize
- @JRubyMethod(visibility = Visibility.PRIVATE, optional = 1)
+ @JRubyMethod(visibility = Visibility.PRIVATE, optional = 1, checkArity = false)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyHash.java b/core/src/main/java/org/jruby/RubyHash.java
index f4c12f8ff40..bfb25fcee8b 100644
--- a/core/src/main/java/org/jruby/RubyHash.java
+++ b/core/src/main/java/org/jruby/RubyHash.java
@@ -796,7 +796,7 @@ public boolean allSymbols() {
/** rb_hash_initialize
*
*/
- @JRubyMethod(optional = 1, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, visibility = PRIVATE)
public IRubyObject initialize(IRubyObject[] args, final Block block) {
modify();
@@ -1651,7 +1651,7 @@ public IRubyObject each_key(final ThreadContext context, final Block block) {
return block.isGiven() ? each_keyCommon(context, block) : enumeratorizeWithSize(context, this, "each_key", RubyHash::size);
}
- @JRubyMethod(name = "transform_keys", optional = 1, rest = true)
+ @JRubyMethod(name = "transform_keys", rest = true)
public IRubyObject transform_keys(final ThreadContext context, IRubyObject[] args, final Block block) {
if (args.length == 0 && !block.isGiven()) {
return enumeratorizeWithSize(context, this, "transform_keys", RubyHash::size);
@@ -1692,7 +1692,7 @@ public IRubyObject transform_values(final ThreadContext context, final Block blo
return hashCopyWithIdentity(context).transform_values_bang(context, block);
}
- @JRubyMethod(name = "transform_keys!", optional = 1, rest = true)
+ @JRubyMethod(name = "transform_keys!", rest = true)
public IRubyObject transform_keys_bang(final ThreadContext context, IRubyObject[] args, final Block block) {
if (args.length == 0 && !block.isGiven()) {
return enumeratorizeWithSize(context, this, "transform_keys!", RubyHash::size);
@@ -2316,7 +2316,7 @@ public IRubyObject rbClone(ThreadContext context) {
return rbClone(context, context.nil);
}
- @JRubyMethod(name = "any?", optional = 1)
+ @JRubyMethod(name = "any?", optional = 1, checkArity = false)
public IRubyObject any_p(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -2434,7 +2434,7 @@ public IRubyObject dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1
return RubyObject.dig2(context, val, arg1, arg2);
}
- @JRubyMethod(name = "dig", required = 1, rest = true)
+ @JRubyMethod(name = "dig", required = 1, rest = true, checkArity = false)
public IRubyObject dig(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/RubyIO.java b/core/src/main/java/org/jruby/RubyIO.java
index 3d314773d67..33361dcc8a4 100644
--- a/core/src/main/java/org/jruby/RubyIO.java
+++ b/core/src/main/java/org/jruby/RubyIO.java
@@ -556,7 +556,7 @@ private void setBinmode() {
}
// MRI: rb_io_reopen
- @JRubyMethod(name = "reopen", required = 1, optional = 1)
+ @JRubyMethod(name = "reopen", required = 1, optional = 1, checkArity = false)
public IRubyObject reopen(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -1171,7 +1171,7 @@ public void setEncoding(ThreadContext context, IRubyObject v1, IRubyObject v2, I
}
// rb_io_s_open, 2014/5/16
- @JRubyMethod(required = 1, rest = true, meta = true, keywords = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, meta = true, keywords = true)
public static IRubyObject open(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
IRubyObject io = ((RubyClass)recv).newInstance(context, args, Block.NULL_BLOCK);
@@ -1200,7 +1200,7 @@ public static IRubyObject sysopen19(ThreadContext context, IRubyObject recv, IRu
}
// rb_io_s_sysopen
- @JRubyMethod(name = "sysopen", required = 1, optional = 2, meta = true)
+ @JRubyMethod(name = "sysopen", required = 1, optional = 2, checkArity = false, meta = true)
public static IRubyObject sysopen(ThreadContext context, IRubyObject recv, IRubyObject[] argv, Block block) {
int argc = Arity.checkArgumentCount(context, argv, 1, 3);
@@ -1379,7 +1379,7 @@ public IRubyObject syswrite(ThreadContext context, IRubyObject str) {
}
// MRI: rb_io_write_nonblock
- @JRubyMethod(name = "write_nonblock", required = 1, optional = 1)
+ @JRubyMethod(name = "write_nonblock", required = 1, optional = 1, checkArity = false)
public IRubyObject write_nonblock(ThreadContext context, IRubyObject[] argv) {
Arity.checkArgumentCount(context, argv, 1, 2);
@@ -1837,7 +1837,7 @@ public static IRubyObject print(ThreadContext context, IRubyObject out, IRubyObj
return context.nil;
}
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public IRubyObject printf(ThreadContext context, IRubyObject[] args) {
write(context, this, RubyKernel.sprintf(context, this, args));
return context.nil;
@@ -1909,7 +1909,7 @@ private long doSeek(ThreadContext context, long pos, int whence) {
// This was a getOpt with one mandatory arg, but it did not work
// so I am parsing it for now.
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public RubyFixnum sysseek(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -2596,7 +2596,7 @@ public IRubyObject fcntl(ThreadContext context, IRubyObject cmd, IRubyObject arg
return ctl(context, cmd, arg);
}
- @JRubyMethod(name = "ioctl", required = 1, optional = 1)
+ @JRubyMethod(name = "ioctl", required = 1, optional = 1, checkArity = false)
public IRubyObject ioctl(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -3064,7 +3064,7 @@ public IRubyObject ungetc(ThreadContext context, IRubyObject c) {
return context.nil;
}
- @JRubyMethod(name = "read_nonblock", required = 1, optional = 2)
+ @JRubyMethod(name = "read_nonblock", required = 1, optional = 2, checkArity = false)
public IRubyObject read_nonblock(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 3);
@@ -3084,7 +3084,7 @@ static IRubyObject nonblockEOF(final Ruby runtime, final boolean noException) {
throw runtime.newEOFError();
}
- @JRubyMethod(name = "readpartial", required = 1, optional = 1)
+ @JRubyMethod(name = "readpartial", required = 1, optional = 1, checkArity = false)
public IRubyObject readpartial(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -3188,7 +3188,7 @@ IRubyObject getPartial(ThreadContext context, IRubyObject[] args, boolean nonblo
}
// MRI: rb_io_sysread
- @JRubyMethod(name = "sysread", required = 1, optional = 1)
+ @JRubyMethod(name = "sysread", required = 1, optional = 1, checkArity = false)
public IRubyObject sysread(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -3779,7 +3779,7 @@ private static IRubyObject foreachInternal(ThreadContext context, IRubyObject re
return nil;
}
- @JRubyMethod(name = "foreach", required = 1, optional = 3, meta = true, writes = LASTLINE)
+ @JRubyMethod(name = "foreach", required = 1, optional = 3, checkArity = false, meta = true, writes = LASTLINE)
public static IRubyObject foreach(final ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block) {
Arity.checkArgumentCount(context, args, 1, 4);
@@ -3792,7 +3792,7 @@ public static RubyIO convertToIO(ThreadContext context, IRubyObject obj) {
return TypeConverter.ioGetIO(context.runtime, obj);
}
- @JRubyMethod(name = "select", required = 1, optional = 3, meta = true)
+ @JRubyMethod(name = "select", required = 1, optional = 3, checkArity = false, meta = true)
public static IRubyObject select(ThreadContext context, IRubyObject recv, IRubyObject[] argv) {
int argc = Arity.checkArgumentCount(context, argv, 1, 4);
@@ -3832,7 +3832,7 @@ public static IRubyObject select(ThreadContext context, IRubyObject recv, IRubyO
}
// MRI: rb_io_advise
- @JRubyMethod(required = 1, optional = 2)
+ @JRubyMethod(required = 1, optional = 2, checkArity = false)
public IRubyObject advise(ThreadContext context, IRubyObject[] argv) {
Ruby runtime = context.runtime;
IRubyObject advice, offset, len;
@@ -3996,7 +3996,7 @@ private static RubyIO ioOpenGeneric(ThreadContext context, IRubyObject recv, IRu
* @param args arguments; path [, length [, offset]]
* @return the binary contents of the given file, at specified length and offset
*/
- @JRubyMethod(meta = true, required = 1, optional = 2)
+ @JRubyMethod(meta = true, required = 1, optional = 2, checkArity = false)
public static IRubyObject binread(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
@@ -4032,7 +4032,7 @@ public static IRubyObject binread(ThreadContext context, IRubyObject recv, IRuby
}
// Enebo: annotation processing forced me to do pangea method here...
- @JRubyMethod(name = "read", meta = true, required = 1, optional = 3)
+ @JRubyMethod(name = "read", meta = true, required = 1, optional = 3, checkArity = false)
public static IRubyObject read(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
int argc = Arity.checkArgumentCount(context, args, 1, 4);
@@ -4084,13 +4084,13 @@ public static IRubyObject read(ThreadContext context, IRubyObject recv, IRubyObj
}
// rb_io_s_binwrite
- @JRubyMethod(meta = true, required = 2, optional = 2)
+ @JRubyMethod(meta = true, required = 2, optional = 2, checkArity = false)
public static IRubyObject binwrite(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return ioStaticWrite(context, recv, args, true);
}
// MRI: rb_io_s_write
- @JRubyMethod(name = "write", meta = true, required = 2, optional = 2)
+ @JRubyMethod(name = "write", meta = true, required = 2, optional = 2, checkArity = false)
public static IRubyObject write(ThreadContext context, IRubyObject recv, IRubyObject[] argv) {
return (ioStaticWrite(context, recv, argv, false));
}
@@ -4161,7 +4161,7 @@ public static IRubyObject readlines19(ThreadContext context, IRubyObject recv, I
}
// rb_io_s_readlines
- @JRubyMethod(name = "readlines", required = 1, optional = 3, meta = true)
+ @JRubyMethod(name = "readlines", required = 1, optional = 3, checkArity = false, meta = true)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
IRubyObject opt = ArgsUtil.getOptionsArg(context.runtime, args);
final RubyIO io = openKeyArgs(context, recv, args, opt);
@@ -4289,7 +4289,7 @@ private static final class RubyPOpen {
}
}
- @JRubyMethod(name = "popen", required = 1, optional = 2, meta = true)
+ @JRubyMethod(name = "popen", required = 1, optional = 2, checkArity = false, meta = true)
public static IRubyObject popen(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
@@ -4391,7 +4391,7 @@ public static IRubyObject pipe(ThreadContext context, IRubyObject recv) {
return pipe(context, recv, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK);
}
- @JRubyMethod(name = "pipe", optional = 3, meta = true)
+ @JRubyMethod(name = "pipe", optional = 3, checkArity = false, meta = true)
public static IRubyObject pipe(ThreadContext context, IRubyObject klass, IRubyObject[] argv, Block block) {
int argc = Arity.checkArgumentCount(context, argv, 0, 3);
@@ -4514,7 +4514,7 @@ private static void pipePairClose(ThreadContext context, RubyIO r, RubyIO w) {
}
}
- @JRubyMethod(name = "copy_stream", required = 2, optional = 2, meta = true)
+ @JRubyMethod(name = "copy_stream", required = 2, optional = 2, checkArity = false, meta = true)
public static IRubyObject copy_stream(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 4);
diff --git a/core/src/main/java/org/jruby/RubyInteger.java b/core/src/main/java/org/jruby/RubyInteger.java
index 6f68f33d209..39d2837a2fb 100644
--- a/core/src/main/java/org/jruby/RubyInteger.java
+++ b/core/src/main/java/org/jruby/RubyInteger.java
@@ -715,7 +715,7 @@ public IRubyObject to_r(ThreadContext context) {
/** integer_rationalize
*
*/
- @JRubyMethod(name = "rationalize", optional = 1)
+ @JRubyMethod(name = "rationalize", optional = 1, checkArity = false)
public IRubyObject rationalize(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyInterrupt.java b/core/src/main/java/org/jruby/RubyInterrupt.java
index a4e242ad687..25c7174e796 100644
--- a/core/src/main/java/org/jruby/RubyInterrupt.java
+++ b/core/src/main/java/org/jruby/RubyInterrupt.java
@@ -64,7 +64,7 @@ protected RaiseException constructThrowable(String message) {
return new Interrupt(message, this);
}
- @JRubyMethod(optional = 1, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, visibility = PRIVATE)
@Override
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyKernel.java b/core/src/main/java/org/jruby/RubyKernel.java
index 300217cb741..3af2517e92a 100644
--- a/core/src/main/java/org/jruby/RubyKernel.java
+++ b/core/src/main/java/org/jruby/RubyKernel.java
@@ -253,7 +253,7 @@ public static IRubyObject open19(ThreadContext context, IRubyObject recv, IRubyO
return open(context, recv, args, block);
}
- @JRubyMethod(name = "open", required = 1, optional = 3, module = true, visibility = PRIVATE, keywords = true)
+ @JRubyMethod(name = "open", required = 1, optional = 3, checkArity = false, module = true, visibility = PRIVATE, keywords = true)
public static IRubyObject open(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 4);
@@ -302,7 +302,7 @@ public static IRubyObject getc(ThreadContext context, IRubyObject recv) {
}
// MRI: rb_f_gets
- @JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = context.runtime;
IRubyObject argsFile = runtime.getArgsFile();
@@ -313,7 +313,7 @@ public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObj
return sites(context).gets.call(context, argsFile, argsFile, args);
}
- @JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject abort(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -668,7 +668,7 @@ public static IRubyObject printf(ThreadContext context, IRubyObject recv, IRubyO
return context.nil;
}
- @JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject readline(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
IRubyObject line = gets(context, recv, args);
@@ -679,7 +679,7 @@ public static IRubyObject readline(ThreadContext context, IRubyObject recv, IRub
return line;
}
- @JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.readlines(context, context.runtime.getArgsFile(), args);
}
@@ -711,12 +711,12 @@ private static RubyString getLastlineString(ThreadContext context, Ruby runtime)
}
}
- @JRubyMethod(required = 1, optional = 3, module = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, optional = 3, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject select(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyIO.select(context, recv, args);
}
- @JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject sleep(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -768,7 +768,7 @@ public static IRubyObject exit(IRubyObject recv, IRubyObject[] args) {
return runtime.getNil(); // not reached
}
- @JRubyMethod(name = "exit!", optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "exit!", optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject exit_bang(IRubyObject recv, IRubyObject[] args) {
Ruby runtime = recv.getRuntime();
@@ -867,7 +867,7 @@ public static RubyBoolean block_given_p(ThreadContext context, IRubyObject recv)
return RubyBoolean.newBoolean(context, context.getCurrentFrame().getBlock().isGiven());
}
- @JRubyMethod(name = {"sprintf", "format"}, required = 1, rest = true, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = {"sprintf", "format"}, required = 1, rest = true, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject sprintf(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
if (args.length == 0) {
throw context.runtime.newArgumentError("sprintf must have at least one argument");
@@ -926,7 +926,7 @@ public static IRubyObject raise(ThreadContext context, IRubyObject self, IRubyOb
throw raise;
}
- @JRubyMethod(name = {"raise", "fail"}, optional = 3, module = true, visibility = PRIVATE, omit = true)
+ @JRubyMethod(name = {"raise", "fail"}, optional = 3, checkArity = false, module = true, visibility = PRIVATE, omit = true)
public static IRubyObject raise(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 3);
@@ -1150,7 +1150,7 @@ private static IRubyObject loadCommon(Ruby runtime, RubyString path, IRubyObject
return runtime.getTrue();
}
- @JRubyMethod(name = "eval", required = 1, optional = 3, module = true, visibility = PRIVATE,
+ @JRubyMethod(name = "eval", required = 1, optional = 3, checkArity = false, module = true, visibility = PRIVATE,
reads = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE},
writes = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE})
public static IRubyObject eval(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
@@ -1496,7 +1496,7 @@ public static IRubyObject set_trace_func(ThreadContext context, IRubyObject recv
return trace_func;
}
- @JRubyMethod(required = 1, optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject trace_var(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -1517,7 +1517,7 @@ public static IRubyObject trace_var(ThreadContext context, IRubyObject recv, IRu
return context.nil;
}
- @JRubyMethod(required = 1, optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject untrace_var(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -1543,7 +1543,7 @@ public static IRubyObject untrace_var(ThreadContext context, IRubyObject recv, I
return context.nil;
}
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public static IRubyObject define_singleton_method(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -1624,7 +1624,7 @@ private static IRubyObject loopSize(ThreadContext context, IRubyObject self, IRu
return RubyFloat.newFloat(context.runtime, RubyFloat.INFINITY);
}
- @JRubyMethod(required = 2, optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(required = 2, optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject test(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 3);
@@ -1815,12 +1815,12 @@ public static RubyFixnum spawn(ThreadContext context, IRubyObject recv, IRubyObj
return RubyProcess.spawn(context, recv, args);
}
- @JRubyMethod(required = 1, optional = 9, module = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, optional = 9, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject syscall(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
throw context.runtime.newNotImplementedError("Kernel#syscall is not implemented in JRuby");
}
- @JRubyMethod(name = "system", required = 1, rest = true, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "system", required = 1, rest = true, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject system(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
@@ -2036,7 +2036,7 @@ public static IRubyObject tap(ThreadContext context, IRubyObject recv, Block blo
return recv;
}
- @JRubyMethod(name = {"to_enum", "enum_for"}, optional = 1, rest = true, keywords = true)
+ @JRubyMethod(name = {"to_enum", "enum_for"}, rest = true, keywords = true)
public static IRubyObject obj_to_enum(final ThreadContext context, IRubyObject self, IRubyObject[] args, final Block block) {
// to_enum is a bit strange in that it will propagate the arguments it passes to each element it calls. We are determining
// whether we have received keywords so we can propagate this info.
@@ -2212,7 +2212,7 @@ public static IRubyObject dup(IRubyObject self) {
return ((RubyBasicObject)self).dup();
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject display(ThreadContext context, IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -2249,7 +2249,7 @@ public static RubyBoolean kind_of_p(ThreadContext context, IRubyObject self, IRu
return ((RubyBasicObject)self).kind_of_p(context, type);
}
- @JRubyMethod(name = "methods", optional = 1)
+ @JRubyMethod(name = "methods", optional = 1, checkArity = false)
public static IRubyObject methods(ThreadContext context, IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -2266,7 +2266,7 @@ public static IRubyObject object_id(IRubyObject self) {
return self.id();
}
- @JRubyMethod(name = "public_methods", optional = 1)
+ @JRubyMethod(name = "public_methods", optional = 1, checkArity = false)
public static IRubyObject public_methods(ThreadContext context, IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -2278,7 +2278,7 @@ public static IRubyObject public_methods19(ThreadContext context, IRubyObject se
return ((RubyBasicObject)self).public_methods(context, args);
}
- @JRubyMethod(name = "protected_methods", optional = 1)
+ @JRubyMethod(name = "protected_methods", optional = 1, checkArity = false)
public static IRubyObject protected_methods(ThreadContext context, IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -2290,7 +2290,7 @@ public static IRubyObject protected_methods19(ThreadContext context, IRubyObject
return ((RubyBasicObject)self).protected_methods(context, args);
}
- @JRubyMethod(name = "private_methods", optional = 1)
+ @JRubyMethod(name = "private_methods", optional = 1, checkArity = false)
public static IRubyObject private_methods(ThreadContext context, IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -2302,7 +2302,7 @@ public static IRubyObject private_methods19(ThreadContext context, IRubyObject s
return ((RubyBasicObject)self).private_methods(context, args);
}
- @JRubyMethod(name = "singleton_methods", optional = 1)
+ @JRubyMethod(name = "singleton_methods", optional = 1, checkArity = false)
public static RubyArray singleton_methods(ThreadContext context, IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -2329,7 +2329,7 @@ public static IRubyObject to_s(IRubyObject self) {
return ((RubyBasicObject)self).to_s();
}
- @JRubyMethod(name = "extend", required = 1, rest = true)
+ @JRubyMethod(name = "extend", required = 1, rest = true, checkArity = false)
public static IRubyObject extend(IRubyObject self, IRubyObject[] args) {
Arity.checkArgumentCount(self.getRuntime(), args, 1, -1);
@@ -2348,7 +2348,7 @@ public static IRubyObject send(ThreadContext context, IRubyObject self, IRubyObj
public static IRubyObject send(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) {
return ((RubyBasicObject)self).send(context, arg0, arg1, arg2, block);
}
- @JRubyMethod(name = "send", required = 1, rest = true, omit = true, keywords = true)
+ @JRubyMethod(name = "send", required = 1, rest = true, checkArity = false, omit = true, keywords = true)
public static IRubyObject send(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/RubyMarshal.java b/core/src/main/java/org/jruby/RubyMarshal.java
index 6759b4277d4..1906f75b53e 100644
--- a/core/src/main/java/org/jruby/RubyMarshal.java
+++ b/core/src/main/java/org/jruby/RubyMarshal.java
@@ -70,7 +70,7 @@ public static RubyModule createMarshalModule(Ruby runtime) {
return module;
}
- @JRubyMethod(required = 1, optional = 2, module = true, visibility = Visibility.PRIVATE)
+ @JRubyMethod(required = 1, optional = 2, checkArity = false, module = true, visibility = Visibility.PRIVATE)
public static IRubyObject dump(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
@@ -115,7 +115,7 @@ public static IRubyObject dump(IRubyObject recv, IRubyObject[] args, Block unuse
return dump(recv.getRuntime().getCurrentContext(), recv, args, unusedBlock);
}
- @JRubyMethod(name = {"load", "restore"}, required = 1, optional = 2, module = true, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = {"load", "restore"}, required = 1, optional = 2, checkArity = false, module = true, visibility = Visibility.PRIVATE)
public static IRubyObject load(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
diff --git a/core/src/main/java/org/jruby/RubyMethod.java b/core/src/main/java/org/jruby/RubyMethod.java
index a7ad66ba67c..f1b036fc56a 100644
--- a/core/src/main/java/org/jruby/RubyMethod.java
+++ b/core/src/main/java/org/jruby/RubyMethod.java
@@ -381,7 +381,7 @@ public IRubyObject parameters(ThreadContext context) {
return Helpers.methodToParameters(context.runtime, this);
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject curry(ThreadContext context, IRubyObject[] args) {
return to_proc(context).callMethod(context, "curry", args);
}
diff --git a/core/src/main/java/org/jruby/RubyModule.java b/core/src/main/java/org/jruby/RubyModule.java
index fb8958cf1fc..5d96d268e1d 100644
--- a/core/src/main/java/org/jruby/RubyModule.java
+++ b/core/src/main/java/org/jruby/RubyModule.java
@@ -2958,7 +2958,7 @@ public void addWriteAttribute(ThreadContext context, String name) {
addAccessor(context, TypeConverter.checkID(context.runtime, name), PUBLIC, false, true);
}
- @JRubyMethod(required = 1, rest = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, visibility = PRIVATE)
public IRubyObject ruby2_keywords(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
@@ -3178,7 +3178,7 @@ public RubyArray instance_methods(IRubyObject[] args) {
return instance_methods19(args);
}
- @JRubyMethod(name = "instance_methods", optional = 1)
+ @JRubyMethod(name = "instance_methods", optional = 1, checkArity = false)
public RubyArray instance_methods19(IRubyObject[] args) {
Arity.checkArgumentCount(getRuntime(), args, 0, 1);
@@ -3189,7 +3189,7 @@ public RubyArray public_instance_methods(IRubyObject[] args) {
return public_instance_methods19(args);
}
- @JRubyMethod(name = "public_instance_methods", optional = 1)
+ @JRubyMethod(name = "public_instance_methods", optional = 1, checkArity = false)
public RubyArray public_instance_methods19(IRubyObject[] args) {
Arity.checkArgumentCount(getRuntime(), args, 0, 1);
@@ -3213,7 +3213,7 @@ public IRubyObject public_instance_method(IRubyObject symbol) {
/** rb_class_protected_instance_methods
*
*/
- @JRubyMethod(name = "protected_instance_methods", optional = 1)
+ @JRubyMethod(name = "protected_instance_methods", optional = 1, checkArity = false)
public RubyArray protected_instance_methods(IRubyObject[] args) {
Arity.checkArgumentCount(getRuntime(), args, 0, 1);
@@ -3228,7 +3228,7 @@ public RubyArray protected_instance_methods19(IRubyObject[] args) {
/** rb_class_private_instance_methods
*
*/
- @JRubyMethod(name = "private_instance_methods", optional = 1)
+ @JRubyMethod(name = "private_instance_methods", optional = 1, checkArity = false)
public RubyArray private_instance_methods(IRubyObject[] args) {
Arity.checkArgumentCount(getRuntime(), args, 0, 1);
@@ -3295,7 +3295,7 @@ public IRubyObject extend_object(IRubyObject obj) {
/** rb_mod_include
*
*/
- @JRubyMethod(name = "include", required = 1, rest = true)
+ @JRubyMethod(name = "include", required = 1, rest = true, checkArity = false)
public RubyModule include(IRubyObject[] modules) {
Ruby runtime = getRuntime();
@@ -4171,7 +4171,7 @@ public IRubyObject const_get_2_0(ThreadContext context, IRubyObject[] args) {
/** rb_mod_const_get
*
*/
- @JRubyMethod(name = "const_get", required = 1, optional = 1)
+ @JRubyMethod(name = "const_get", required = 1, optional = 1, checkArity = false)
public IRubyObject const_get(ThreadContext context, IRubyObject... args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -4216,7 +4216,7 @@ public IRubyObject const_get(ThreadContext context, IRubyObject... args) {
return mod.getConstant(validateConstant(name, symbol), firstConstant && inherit, firstConstant && inherit);
}
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public IRubyObject const_source_location(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -4445,7 +4445,7 @@ public IRubyObject private_constant(ThreadContext context, IRubyObject name) {
return this;
}
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public IRubyObject private_constant(ThreadContext context, IRubyObject[] rubyNames) {
Arity.checkArgumentCount(context, rubyNames, 1, -1);
@@ -4466,7 +4466,7 @@ public IRubyObject public_constant(ThreadContext context, IRubyObject name) {
return this;
}
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public IRubyObject public_constant(ThreadContext context, IRubyObject[] rubyNames) {
Arity.checkArgumentCount(context, rubyNames, 1, -1);
@@ -4476,7 +4476,7 @@ public IRubyObject public_constant(ThreadContext context, IRubyObject[] rubyName
return this;
}
- @JRubyMethod(name = "prepend", required = 1, rest = true)
+ @JRubyMethod(name = "prepend", required = 1, rest = true, checkArity = false)
public IRubyObject prepend(ThreadContext context, IRubyObject[] modules) {
int argc = Arity.checkArgumentCount(context, modules, 1, -1);
@@ -5968,7 +5968,7 @@ public static RubyClass createRefinementClass(Ruby runtime, RubyClass refinement
}
public static class RefinementMethods {
- @JRubyMethod(required = 1, rest = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, visibility = PRIVATE)
public static IRubyObject import_methods(ThreadContext context, IRubyObject self, IRubyObject[] modules) {
Arity.checkArgumentCount(context, modules, 1, -1);
diff --git a/core/src/main/java/org/jruby/RubyNil.java b/core/src/main/java/org/jruby/RubyNil.java
index 42440a98041..d9643f4caf6 100644
--- a/core/src/main/java/org/jruby/RubyNil.java
+++ b/core/src/main/java/org/jruby/RubyNil.java
@@ -245,7 +245,7 @@ public static IRubyObject to_r(ThreadContext context, IRubyObject recv) {
/** nilclass_rationalize
*
*/
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject rationalize(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyNumeric.java b/core/src/main/java/org/jruby/RubyNumeric.java
index b679c4aa616..eaff288007b 100644
--- a/core/src/main/java/org/jruby/RubyNumeric.java
+++ b/core/src/main/java/org/jruby/RubyNumeric.java
@@ -1012,7 +1012,7 @@ public IRubyObject truncate(ThreadContext context) {
/**
* num_step
*/
- @JRubyMethod(optional = 2)
+ @JRubyMethod(optional = 2, checkArity = false)
public IRubyObject step(ThreadContext context, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 0, 2);
diff --git a/core/src/main/java/org/jruby/RubyObjectSpace.java b/core/src/main/java/org/jruby/RubyObjectSpace.java
index 8548cf92f3e..506bb8bfbbd 100644
--- a/core/src/main/java/org/jruby/RubyObjectSpace.java
+++ b/core/src/main/java/org/jruby/RubyObjectSpace.java
@@ -68,7 +68,7 @@ public static RubyModule createObjectSpaceModule(Ruby runtime) {
return objectSpaceModule;
}
- @JRubyMethod(required = 1, optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject define_finalizer(IRubyObject recv, IRubyObject[] args, Block block) {
Ruby runtime = recv.getRuntime();
@@ -206,14 +206,14 @@ public static IRubyObject each_objectInternal(final ThreadContext context, IRuby
return runtime.newFixnum(count);
}
- @JRubyMethod(name = "each_object", optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "each_object", optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject each_object(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 0, 1);
return block.isGiven() ? each_objectInternal(context, recv, args, block) : enumeratorize(context.runtime, recv, "each_object", args);
}
- @JRubyMethod(name = "garbage_collect", module = true, visibility = PRIVATE, optional = 1)
+ @JRubyMethod(name = "garbage_collect", module = true, visibility = PRIVATE, optional = 1, checkArity = false)
public static IRubyObject garbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyGC.start(context, recv, args);
}
diff --git a/core/src/main/java/org/jruby/RubyProcess.java b/core/src/main/java/org/jruby/RubyProcess.java
index 3588f5eaf7f..032ec1fa698 100644
--- a/core/src/main/java/org/jruby/RubyProcess.java
+++ b/core/src/main/java/org/jruby/RubyProcess.java
@@ -217,7 +217,7 @@ public static RubyStatus newProcessStatus(Ruby runtime, long status, long pid) {
return new RubyStatus(runtime, runtime.getProcStatus(), status, pid);
}
- @JRubyMethod(module = true, optional = 2)
+ @JRubyMethod(module = true, optional = 2, checkArity = false)
public static IRubyObject wait(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 2);
@@ -667,12 +667,12 @@ public static IRubyObject setuid(ThreadContext context, IRubyObject recv, IRubyO
}
}
- @JRubyMethod(name = "abort", optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "abort", optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject abort(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyKernel.abort(context, recv, args);
}
- @JRubyMethod(name = "exit!", optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "exit!", optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject exit_bang(IRubyObject recv, IRubyObject[] args) {
return RubyKernel.exit_bang(recv, args);
}
@@ -1782,7 +1782,7 @@ public static RubyFixnum spawn(ThreadContext context, IRubyObject recv, IRubyObj
return RubyFixnum.newFixnum(runtime, ShellLauncher.runExternalWithoutWait(runtime, args));
}
- @JRubyMethod(name = "exit", optional = 1, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "exit", optional = 1, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject exit(IRubyObject recv, IRubyObject[] args) {
return RubyKernel.exit(recv, args);
}
diff --git a/core/src/main/java/org/jruby/RubyRandomBase.java b/core/src/main/java/org/jruby/RubyRandomBase.java
index b860582bf71..b013d07807e 100644
--- a/core/src/main/java/org/jruby/RubyRandomBase.java
+++ b/core/src/main/java/org/jruby/RubyRandomBase.java
@@ -58,7 +58,7 @@ static void setIntBigIntegerBuffer(byte[] dest, int loc, int value) {
protected RubyRandom.RandomType random = null;
- @JRubyMethod(visibility = PRIVATE, optional = 1)
+ @JRubyMethod(visibility = PRIVATE, optional = 1, checkArity = false)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubyRange.java b/core/src/main/java/org/jruby/RubyRange.java
index 4ad068b1d29..0e4132d1b5d 100644
--- a/core/src/main/java/org/jruby/RubyRange.java
+++ b/core/src/main/java/org/jruby/RubyRange.java
@@ -286,7 +286,7 @@ private void init(ThreadContext context, IRubyObject begin, IRubyObject end, boo
}
}
- @JRubyMethod(required = 2, optional = 1, visibility = PRIVATE)
+ @JRubyMethod(required = 2, optional = 1, checkArity = false, visibility = PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block unusedBlock) {
Arity.checkArgumentCount(context, args, 2, 3);
diff --git a/core/src/main/java/org/jruby/RubyRational.java b/core/src/main/java/org/jruby/RubyRational.java
index dda6b308d38..f9529d3506b 100644
--- a/core/src/main/java/org/jruby/RubyRational.java
+++ b/core/src/main/java/org/jruby/RubyRational.java
@@ -1392,7 +1392,7 @@ public IRubyObject to_r(ThreadContext context) {
/** nurat_rationalize
*
*/
- @JRubyMethod(name = "rationalize", optional = 1)
+ @JRubyMethod(name = "rationalize", optional = 1, checkArity = false)
public IRubyObject rationalize(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/RubySignalException.java b/core/src/main/java/org/jruby/RubySignalException.java
index 7d1a208d3e7..04c9f95ebc8 100644
--- a/core/src/main/java/org/jruby/RubySignalException.java
+++ b/core/src/main/java/org/jruby/RubySignalException.java
@@ -62,7 +62,7 @@ static RubyClass define(Ruby runtime, RubyClass exceptionClass) {
return signalExceptionClass;
}
- @JRubyMethod(optional = 2, visibility = PRIVATE)
+ @JRubyMethod(optional = 2, checkArity = false, visibility = PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 2);
diff --git a/core/src/main/java/org/jruby/RubyString.java b/core/src/main/java/org/jruby/RubyString.java
index 65e61571a05..4178b457925 100644
--- a/core/src/main/java/org/jruby/RubyString.java
+++ b/core/src/main/java/org/jruby/RubyString.java
@@ -1713,7 +1713,7 @@ public IRubyObject match19(ThreadContext context, IRubyObject pattern, IRubyObje
return block.isGiven() && result != context.nil ? block.yield(context, result) : result;
}
- @JRubyMethod(name = "match", required = 1, rest = true)
+ @JRubyMethod(name = "match", required = 1, rest = true, checkArity = false)
public IRubyObject match19(ThreadContext context, IRubyObject[] args, Block block) {
if (args.length < 1) {
Arity.checkArgumentCount(context, args, 1, -1);
@@ -5764,7 +5764,7 @@ public IRubyObject count(ThreadContext context, IRubyObject arg) {
}
// MRI: rb_str_count for arity > 1, first half
- @JRubyMethod(name = "count", required = 1, rest = true)
+ @JRubyMethod(name = "count", required = 1, rest = true, checkArity = false)
public IRubyObject count(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -5802,7 +5802,7 @@ public IRubyObject delete(ThreadContext context, IRubyObject arg) {
return str;
}
- @JRubyMethod(name = "delete", required = 1, rest = true)
+ @JRubyMethod(name = "delete", required = 1, rest = true, checkArity = false)
public IRubyObject delete(ThreadContext context, IRubyObject[] args) {
RubyString str = strDup(context.runtime, context.runtime.getString());
str.delete_bang(context, args);
@@ -5831,7 +5831,7 @@ public IRubyObject delete_bang(ThreadContext context, IRubyObject arg) {
return this;
}
- @JRubyMethod(name = "delete!", required = 1, rest = true)
+ @JRubyMethod(name = "delete!", required = 1, rest = true, checkArity = false)
public IRubyObject delete_bang(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -5904,7 +5904,7 @@ public IRubyObject squeeze(ThreadContext context, IRubyObject arg) {
return str;
}
- @JRubyMethod(name = "squeeze", required = 1, rest = true)
+ @JRubyMethod(name = "squeeze", required = 1, rest = true, checkArity = false)
public IRubyObject squeeze(ThreadContext context, IRubyObject[] args) {
RubyString str = strDup(context.runtime, context.runtime.getString());
str.squeeze_bang(context, args);
@@ -5958,7 +5958,7 @@ public IRubyObject squeeze_bang(ThreadContext context, IRubyObject arg) {
return this;
}
- @JRubyMethod(name = "squeeze!", required = 1, rest = true)
+ @JRubyMethod(name = "squeeze!", required = 1, rest = true, checkArity = false)
public IRubyObject squeeze_bang(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -6615,7 +6615,7 @@ public IRubyObject encode_bang(ThreadContext context, IRubyObject arg0, IRubyObj
return encode_bang(context, new IRubyObject[]{arg0,arg1,arg2});
}
- @JRubyMethod(name = "encode!", optional = 3)
+ @JRubyMethod(name = "encode!", optional = 3, checkArity = false)
public IRubyObject encode_bang(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 3);
diff --git a/core/src/main/java/org/jruby/RubyStruct.java b/core/src/main/java/org/jruby/RubyStruct.java
index 6a8fd8a5202..20c788d5699 100644
--- a/core/src/main/java/org/jruby/RubyStruct.java
+++ b/core/src/main/java/org/jruby/RubyStruct.java
@@ -214,7 +214,7 @@ private IRubyObject getByName(String name) {
* MRI: rb_struct_s_def / make_struct
*
*/
- @JRubyMethod(name = "new", required = 1, rest = true, meta = true, keywords = true)
+ @JRubyMethod(name = "new", required = 1, rest = true, checkArity = false, meta = true, keywords = true)
public static RubyClass newInstance(IRubyObject recv, IRubyObject[] args, Block block) {
Ruby runtime = recv.getRuntime();
@@ -883,7 +883,7 @@ public IRubyObject dig(ThreadContext context, IRubyObject arg0, IRubyObject arg1
return RubyObject.dig2(context, val, arg1, arg2);
}
- @JRubyMethod(name = "dig", required = 1, rest = true)
+ @JRubyMethod(name = "dig", required = 1, rest = true, checkArity = false)
public IRubyObject dig(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/RubySymbol.java b/core/src/main/java/org/jruby/RubySymbol.java
index 8c9e3968511..28b21354c39 100644
--- a/core/src/main/java/org/jruby/RubySymbol.java
+++ b/core/src/main/java/org/jruby/RubySymbol.java
@@ -610,7 +610,7 @@ public IRubyObject match_m(ThreadContext context, IRubyObject other, IRubyObject
return newShared(context.runtime).match19(context, other, pos, block);
}
- @JRubyMethod(name = "match", required = 1, rest = true)
+ @JRubyMethod(name = "match", required = 1, rest = true, checkArity = false)
public IRubyObject match_m(ThreadContext context, IRubyObject[] args, Block block) {
return newShared(context.runtime).match19(context, args, block);
}
diff --git a/core/src/main/java/org/jruby/RubySystemCallError.java b/core/src/main/java/org/jruby/RubySystemCallError.java
index 29362cdb34d..73e496fc685 100644
--- a/core/src/main/java/org/jruby/RubySystemCallError.java
+++ b/core/src/main/java/org/jruby/RubySystemCallError.java
@@ -171,7 +171,7 @@ public static RubyClass define(Ruby runtime, RubyClass standardError) {
return exceptionClass;
}
- @JRubyMethod(optional = 2, visibility = PRIVATE)
+ @JRubyMethod(optional = 2, checkArity = false, visibility = PRIVATE)
@Override
public IRubyObject initialize(IRubyObject[] args, Block block) {
Ruby runtime = getRuntime();
diff --git a/core/src/main/java/org/jruby/RubySystemExit.java b/core/src/main/java/org/jruby/RubySystemExit.java
index d3990005078..1bffe197d99 100644
--- a/core/src/main/java/org/jruby/RubySystemExit.java
+++ b/core/src/main/java/org/jruby/RubySystemExit.java
@@ -72,7 +72,7 @@ protected RaiseException constructThrowable(String message) {
return new SystemExit(message, this);
}
- @JRubyMethod(optional = 2, visibility = PRIVATE)
+ @JRubyMethod(optional = 2, checkArity = false, visibility = PRIVATE)
@Override
public IRubyObject initialize(IRubyObject[] args, Block block) {
Ruby runtime = getRuntime();
diff --git a/core/src/main/java/org/jruby/RubyThread.java b/core/src/main/java/org/jruby/RubyThread.java
index 67e5efac05b..c0cda7323a6 100644
--- a/core/src/main/java/org/jruby/RubyThread.java
+++ b/core/src/main/java/org/jruby/RubyThread.java
@@ -865,12 +865,12 @@ private static int checkInterruptMask(final ThreadContext context, final IRubyOb
throw context.runtime.newArgumentError("unknown mask signature");
}
- @JRubyMethod(name = "pending_interrupt?", meta = true, optional = 1)
+ @JRubyMethod(name = "pending_interrupt?", meta = true, optional = 1, checkArity = false)
public static IRubyObject pending_interrupt_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
return context.getThread().pending_interrupt_p(context, args);
}
- @JRubyMethod(name = "pending_interrupt?", optional = 1)
+ @JRubyMethod(name = "pending_interrupt?", optional = 1, checkArity = false)
public IRubyObject pending_interrupt_p(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -1220,7 +1220,7 @@ public IRubyObject join(IRubyObject[] args) {
return join(getRuntime().getCurrentContext(), args);
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject join(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -1483,7 +1483,7 @@ public final IRubyObject raise(IRubyObject exception, RubyString message) {
return genericRaise(context, context.getThread(), exception, message);
}
- @JRubyMethod(optional = 3)
+ @JRubyMethod(optional = 3, checkArity = false)
public IRubyObject raise(ThreadContext context, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 0, 3);
diff --git a/core/src/main/java/org/jruby/RubyTime.java b/core/src/main/java/org/jruby/RubyTime.java
index 7fb0e3cccc1..5a81b3a78b7 100644
--- a/core/src/main/java/org/jruby/RubyTime.java
+++ b/core/src/main/java/org/jruby/RubyTime.java
@@ -1333,7 +1333,7 @@ private RubyString mdump(final Ruby runtime) {
return string;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public RubyTime round(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -1346,7 +1346,7 @@ public RubyTime round(ThreadContext context, IRubyObject[] args) {
return newTime(context.runtime, _dt, rounded % 1000000);
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public RubyTime floor(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -1359,7 +1359,7 @@ public RubyTime floor(ThreadContext context, IRubyObject[] args) {
return newTime(context.runtime, _dt, floored % 1000000);
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public RubyTime ceil(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 1);
@@ -1409,7 +1409,7 @@ public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, I
return newInstance(context, recv, args);
}
- @JRubyMethod(name = "now", meta = true, optional = 1, keywords = true)
+ @JRubyMethod(name = "now", meta = true, optional = 1, checkArity = false, keywords = true)
public static RubyTime newInstance(ThreadContext context, IRubyObject recv, IRubyObject args[]) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -1451,7 +1451,7 @@ public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObjec
return atOpts(context, recv, arg1, arg2, null, arg3);
}
- @JRubyMethod(required = 1, optional = 3, meta = true)
+ @JRubyMethod(required = 1, optional = 3, checkArity = false, meta = true)
public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
switch (args.length) {
case 1:
@@ -1618,7 +1618,7 @@ private static RubyTime atMulti(ThreadContext context, RubyClass recv, IRubyObje
return time;
}
- @JRubyMethod(name = {"local", "mktime"}, required = 1, optional = 9, meta = true)
+ @JRubyMethod(name = {"local", "mktime"}, required = 1, optional = 9, checkArity = false, meta = true)
public static RubyTime local(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 10);
@@ -1711,7 +1711,7 @@ private IRubyObject initializeNow(ThreadContext context, IRubyObject zone) {
return context.nil;
}
- @JRubyMethod(name = "initialize", optional = 7, visibility = PRIVATE, keywords = true)
+ @JRubyMethod(name = "initialize", optional = 7, checkArity = false, visibility = PRIVATE, keywords = true)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
boolean keywords = hasKeywords(context.resetCallInfo());
IRubyObject zone = null;
@@ -1840,7 +1840,7 @@ private IRubyObject findTimezone(ThreadContext context, IRubyObject zone) {
return Helpers.invokeChecked(context, metaClass, "find_timezone", zone);
}
- @JRubyMethod(name = {"utc", "gm"}, required = 1, optional = 9, meta = true)
+ @JRubyMethod(name = {"utc", "gm"}, required = 1, optional = 9, checkArity = false, meta = true)
public static RubyTime utc(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 10);
diff --git a/core/src/main/java/org/jruby/RubyUnboundMethod.java b/core/src/main/java/org/jruby/RubyUnboundMethod.java
index f4e6fcf2464..d9b1dba8828 100644
--- a/core/src/main/java/org/jruby/RubyUnboundMethod.java
+++ b/core/src/main/java/org/jruby/RubyUnboundMethod.java
@@ -152,7 +152,7 @@ public RubyUnboundMethod rbClone() {
return newUnboundMethod(implementationModule, methodName, originModule, originName, entry);
}
- @JRubyMethod(required = 1, rest = true, keywords = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, keywords = true)
public IRubyObject bind_call(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/RubyUncaughtThrowError.java b/core/src/main/java/org/jruby/RubyUncaughtThrowError.java
index a16e505f150..c09d2222fb7 100644
--- a/core/src/main/java/org/jruby/RubyUncaughtThrowError.java
+++ b/core/src/main/java/org/jruby/RubyUncaughtThrowError.java
@@ -73,7 +73,7 @@ protected RaiseException constructThrowable(String message) {
}
@Override
- @JRubyMethod(required = 2, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(required = 2, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject initialize(IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(getRuntime(), args, 2, 3);
diff --git a/core/src/main/java/org/jruby/common/RubyWarnings.java b/core/src/main/java/org/jruby/common/RubyWarnings.java
index b4ef0e95266..43740bf1dd9 100644
--- a/core/src/main/java/org/jruby/common/RubyWarnings.java
+++ b/core/src/main/java/org/jruby/common/RubyWarnings.java
@@ -276,7 +276,7 @@ public static IRubyObject warn(ThreadContext context, RubyString str) {
return context.nil;
}
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public static IRubyObject warn(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java b/core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
index 3a33bf196d8..f754d6f5926 100644
--- a/core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
+++ b/core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
@@ -367,7 +367,7 @@ private static IRubyObject modeExecute(final ThreadContext context, final RubyMo
}
}
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject mode(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = context.runtime;
@@ -1978,7 +1978,7 @@ public IRubyObject precs(ThreadContext context) {
context.runtime.newFixnum(((getAllDigits().length() / 4) + 1) * 4));
}
- @JRubyMethod(name = "round", optional = 2)
+ @JRubyMethod(name = "round", optional = 2, checkArity = false)
public IRubyObject round(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 2);
diff --git a/core/src/main/java/org/jruby/ext/coverage/CoverageModule.java b/core/src/main/java/org/jruby/ext/coverage/CoverageModule.java
index 5dc68f6203a..50d0f4e14c2 100644
--- a/core/src/main/java/org/jruby/ext/coverage/CoverageModule.java
+++ b/core/src/main/java/org/jruby/ext/coverage/CoverageModule.java
@@ -48,7 +48,7 @@
* Implementation of Ruby 1.9.2's "Coverage" module
*/
public class CoverageModule {
- @JRubyMethod(module = true, optional = 1, keywords = true)
+ @JRubyMethod(module = true, optional = 1, keywords = true, checkArity = false)
public static IRubyObject setup(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -130,14 +130,14 @@ public static IRubyObject suspend(ThreadContext context, IRubyObject self) {
return context.nil;
}
- @JRubyMethod(module = true, optional = 1, keywords = true)
+ @JRubyMethod(module = true, optional = 1, keywords = true, checkArity = false)
public static IRubyObject start(ThreadContext context, IRubyObject self, IRubyObject[] args) {
setup(context, self, args);
resume(context, self);
return context.nil;
}
- @JRubyMethod(module = true, optional = 1, keywords = true)
+ @JRubyMethod(module = true, optional = 1, keywords = true, checkArity = false)
public static IRubyObject result(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/ext/date/RubyDate.java b/core/src/main/java/org/jruby/ext/date/RubyDate.java
index ca77f8fc067..b763a910bc0 100644
--- a/core/src/main/java/org/jruby/ext/date/RubyDate.java
+++ b/core/src/main/java/org/jruby/ext/date/RubyDate.java
@@ -422,7 +422,7 @@ private static RubyDate civilImpl(ThreadContext context, RubyClass klass,
return date;
}
- @JRubyMethod(name = "civil", alias = "new", meta = true, optional = 4) // 4 args case
+ @JRubyMethod(name = "civil", alias = "new", meta = true, optional = 4, checkArity = false) // 4 args case
public static RubyDate civil(ThreadContext context, IRubyObject self, IRubyObject[] args) {
// IRubyObject year, IRubyObject month, IRubyObject mday, IRubyObject start
int argc = Arity.checkArgumentCount(context, args, 0, 4);
@@ -474,7 +474,7 @@ static int getMonth(IRubyObject month) {
return (m < 0) ? m + 13 : m;
}
- @JRubyMethod(name = "valid_civil?", alias = "valid_date?", meta = true, required = 3, optional = 1)
+ @JRubyMethod(name = "valid_civil?", alias = "valid_date?", meta = true, required = 3, optional = 1, checkArity = false)
public static IRubyObject valid_civil_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 3, 4);
@@ -623,7 +623,7 @@ public static IRubyObject _valid_jd_p(IRubyObject self, IRubyObject jd, IRubyObj
return jd;
}
- @JRubyMethod(name = "ordinal", meta = true, optional = 3)
+ @JRubyMethod(name = "ordinal", meta = true, optional = 3, checkArity = false)
public static RubyDate ordinal(ThreadContext context, IRubyObject self, IRubyObject[] args) {
// ordinal(y=-4712, d=1, sg=ITALY)
int argc = Arity.checkArgumentCount(context, args, 0, 3);
@@ -641,7 +641,7 @@ public static RubyDate ordinal(ThreadContext context, IRubyObject self, IRubyObj
return new RubyDate(context, (RubyClass) self, jd_to_ajd(context, jd), rest, 0, sg);
}
- @JRubyMethod(name = "valid_ordinal?", meta = true, required = 2, optional = 1)
+ @JRubyMethod(name = "valid_ordinal?", meta = true, required = 2, optional = 1, checkArity = false)
public static IRubyObject valid_ordinal_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 3);
@@ -660,7 +660,7 @@ private static Long validOrdinalImpl(IRubyObject year, int day, final long sg) {
}
@Deprecated // NOTE: should go away once no date.rb is using it
- @JRubyMethod(name = "_valid_ordinal?", meta = true, required = 2, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "_valid_ordinal?", meta = true, required = 2, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public static IRubyObject _valid_ordinal_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 3);
@@ -670,12 +670,12 @@ public static IRubyObject _valid_ordinal_p(ThreadContext context, IRubyObject se
}
@Deprecated // NOTE: should go away once no date.rb is using it
- @JRubyMethod(name = "_valid_ordinal?", required = 2, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "_valid_ordinal?", required = 2, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject _valid_ordinal_p(ThreadContext context, IRubyObject[] args) {
return RubyDate._valid_ordinal_p(context, null, args);
}
- @JRubyMethod(name = "commercial", meta = true, optional = 4)
+ @JRubyMethod(name = "commercial", meta = true, optional = 4, checkArity = false)
public static RubyDate commercial(ThreadContext context, IRubyObject self, IRubyObject[] args) {
// commercial(y=-4712, w=1, d=1, sg=ITALY)
int argc = Arity.checkArgumentCount(context, args, 0, 4);
@@ -691,7 +691,7 @@ public static RubyDate commercial(ThreadContext context, IRubyObject self, IRuby
return new RubyDate(context, (RubyClass) self, jd_to_ajd(context, jd), 0, sg);
}
- @JRubyMethod(name = "valid_commercial?", meta = true, required = 3, optional = 1)
+ @JRubyMethod(name = "valid_commercial?", meta = true, required = 3, optional = 1, checkArity = false)
public static IRubyObject valid_commercial_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 3, 4);
@@ -708,7 +708,7 @@ static Long validCommercialImpl(IRubyObject year, IRubyObject week, IRubyObject
}
@Deprecated // NOTE: should go away once no date.rb is using it
- @JRubyMethod(name = "_valid_commercial?", meta = true, required = 3, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "_valid_commercial?", meta = true, required = 3, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public static IRubyObject _valid_commercial_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 3, 4);
@@ -718,7 +718,7 @@ public static IRubyObject _valid_commercial_p(ThreadContext context, IRubyObject
}
@Deprecated // NOTE: should go away once no date.rb is using it
- @JRubyMethod(name = "_valid_weeknum?", meta = true, required = 4, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "_valid_weeknum?", meta = true, required = 4, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public static IRubyObject _valid_weeknum_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 4, 5);
@@ -754,7 +754,7 @@ private static DateTime todayDate(final ThreadContext context, final Chronology
return new DateTime(today.getYear(), today.getMonthOfYear(), today.getDayOfMonth(), 0, 0, chrono);
}
- @JRubyMethod(name = "_valid_civil?", meta = true, required = 3, optional = 1)
+ @JRubyMethod(name = "_valid_civil?", meta = true, required = 3, optional = 1, checkArity = false)
public static IRubyObject _valid_civil_p(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 3, 4);
@@ -764,7 +764,7 @@ public static IRubyObject _valid_civil_p(ThreadContext context, IRubyObject self
}
@Deprecated // NOTE: should go away once no date.rb is using it
- @JRubyMethod(name = "_valid_civil?", required = 3, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "_valid_civil?", required = 3, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject _valid_civil_p(ThreadContext context, IRubyObject[] args) {
return RubyDate._valid_civil_p(context, null, args);
}
@@ -1143,7 +1143,7 @@ public IRubyObject offset(ThreadContext context) {
return RubyRational.newRationalCanonicalize(context, offset, DAY_MS);
}
- @JRubyMethod(optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject new_offset(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -1512,7 +1512,7 @@ static RubyNumeric jd_to_ajd(ThreadContext context, RubyNumeric jd, RubyNumeric
return (RubyNumeric) ((RubyNumeric) tmp.op_plus(context, fr)).op_plus(context, MINUS_HALF);
}
- @JRubyMethod(meta = true, required = 2, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(meta = true, required = 2, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public static RubyNumeric jd_to_ajd(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 3);
@@ -2366,7 +2366,7 @@ public static IRubyObject _match(ThreadContext context, IRubyObject self, IRubyO
return ((RubyRegexp) reg).match_m(context, str, false);
}
- @JRubyMethod(name = "s3e", meta = true, required = 4, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "s3e", meta = true, required = 4, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public static IRubyObject _s3e(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 4, 5);
diff --git a/core/src/main/java/org/jruby/ext/date/RubyDateTime.java b/core/src/main/java/org/jruby/ext/date/RubyDateTime.java
index 25b698200b7..8228ac12707 100644
--- a/core/src/main/java/org/jruby/ext/date/RubyDateTime.java
+++ b/core/src/main/java/org/jruby/ext/date/RubyDateTime.java
@@ -171,7 +171,7 @@ public static RubyDateTime civil(ThreadContext context, IRubyObject self, IRubyO
return new RubyDateTime(context.runtime, (RubyClass) self, civilImpl(context, year, month), 0);
}
- @JRubyMethod(name = "civil", alias = "new", meta = true, optional = 8)
+ @JRubyMethod(name = "civil", alias = "new", meta = true, optional = 8, checkArity = false)
public static RubyDateTime civil(ThreadContext context, IRubyObject self, IRubyObject[] args) {
// year=-4712, month=1, mday=1,
// hour=0, minute=0, second=0, offset=0, start=Date::ITALY
@@ -390,7 +390,7 @@ public static RubyDateTime jd(ThreadContext context, IRubyObject self) { // jd =
return new RubyDateTime(context.runtime, (RubyClass) self, defaultDateTime, 0);
}
- @JRubyMethod(name = "jd", meta = true, optional = 6)
+ @JRubyMethod(name = "jd", meta = true, optional = 6, checkArity = false)
public static RubyDateTime jd(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 6);
diff --git a/core/src/main/java/org/jruby/ext/digest/RubyDigest.java b/core/src/main/java/org/jruby/ext/digest/RubyDigest.java
index ee32c04d404..bd518fc3da2 100644
--- a/core/src/main/java/org/jruby/ext/digest/RubyDigest.java
+++ b/core/src/main/java/org/jruby/ext/digest/RubyDigest.java
@@ -312,7 +312,7 @@ public static IRubyObject newObject(ThreadContext context, IRubyObject self) {
return self.rbClone().callMethod(context, "reset");
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject digest(ThreadContext context, IRubyObject self, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -337,7 +337,7 @@ public static IRubyObject digest_bang(ThreadContext context, IRubyObject self) {
return value;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public static IRubyObject hexdigest(ThreadContext context, IRubyObject self, IRubyObject[] args) {
return toHexString(context.runtime, digest(context, self, args).convertToString().getBytes());
}
@@ -347,7 +347,7 @@ public static IRubyObject hexdigest_bang(ThreadContext context, IRubyObject self
return toHexString(context.runtime, digest_bang(context, self).convertToString().getBytes());
}
- @JRubyMethod(name = "bubblebabble", required = 1, optional = 1, meta = true)
+ @JRubyMethod(name = "bubblebabble", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject bubblebabble(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
byte[] digest = recv.callMethod(context, "digest", args, Block.NULL_BLOCK).convertToString().getBytes();
return RubyString.newString(recv.getRuntime(), BubbleBabble.bubblebabble(digest, 0, digest.length));
@@ -371,7 +371,7 @@ public DigestClass(Ruby runtime, RubyClass type) {
super(runtime, type);
}
- @JRubyMethod(name = "digest", required = 1, rest = true, meta = true)
+ @JRubyMethod(name = "digest", required = 1, rest = true, checkArity = false, meta = true)
public static IRubyObject s_digest(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
final Ruby runtime = context.runtime;
if (args.length < 1) {
@@ -383,7 +383,7 @@ public static IRubyObject s_digest(ThreadContext context, IRubyObject recv, IRub
return obj.callMethod(context, "digest", str);
}
- @JRubyMethod(name = "hexdigest", required = 1, optional = 1, meta = true)
+ @JRubyMethod(name = "hexdigest", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject s_hexdigest(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
Ruby runtime = recv.getRuntime();
byte[] digest = recv.callMethod(context, "digest", args, Block.NULL_BLOCK).convertToString().getBytes();
diff --git a/core/src/main/java/org/jruby/ext/etc/RubyEtc.java b/core/src/main/java/org/jruby/ext/etc/RubyEtc.java
index 5de656f1b2f..7fb8e87f4d9 100644
--- a/core/src/main/java/org/jruby/ext/etc/RubyEtc.java
+++ b/core/src/main/java/org/jruby/ext/etc/RubyEtc.java
@@ -212,7 +212,7 @@ public static synchronized IRubyObject confstr(ThreadContext context, IRubyObjec
return RubyString.newString(context.runtime, bytes);
}
- @JRubyMethod(optional=1, module = true)
+ @JRubyMethod(optional = 1, checkArity = false, module = true)
public static synchronized IRubyObject getpwuid(IRubyObject recv, IRubyObject[] args) {
Ruby runtime = recv.getRuntime();
@@ -396,7 +396,7 @@ public static synchronized IRubyObject getgrnam(IRubyObject recv, IRubyObject na
}
}
- @JRubyMethod(optional=1, module = true)
+ @JRubyMethod(optional = 1, checkArity = false, module = true)
public static synchronized IRubyObject getgrgid(IRubyObject recv, IRubyObject[] args) {
Ruby runtime = recv.getRuntime();
diff --git a/core/src/main/java/org/jruby/ext/ffi/AbstractMemory.java b/core/src/main/java/org/jruby/ext/ffi/AbstractMemory.java
index 9641a8d4c1f..2d2b4376d22 100644
--- a/core/src/main/java/org/jruby/ext/ffi/AbstractMemory.java
+++ b/core/src/main/java/org/jruby/ext/ffi/AbstractMemory.java
@@ -1973,7 +1973,7 @@ private IRubyObject putBytes(ThreadContext context, long off, ByteList bl, int i
return this;
}
- @JRubyMethod(name = "put_bytes", required = 2, optional = 2)
+ @JRubyMethod(name = "put_bytes", required = 2, optional = 2, checkArity = false)
public IRubyObject put_bytes(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 4);
@@ -1989,7 +1989,7 @@ public IRubyObject read_bytes(ThreadContext context, IRubyObject lenArg) {
return MemoryUtil.getTaintedByteString(context.runtime, getMemoryIO(), 0, Util.int32Value(lenArg));
}
- @JRubyMethod(name = "write_bytes", required = 1, optional = 2)
+ @JRubyMethod(name = "write_bytes", required = 1, optional = 2, checkArity = false)
public IRubyObject write_bytes(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 3);
diff --git a/core/src/main/java/org/jruby/ext/ffi/CallbackInfo.java b/core/src/main/java/org/jruby/ext/ffi/CallbackInfo.java
index db961fcff66..e5ba72d4691 100644
--- a/core/src/main/java/org/jruby/ext/ffi/CallbackInfo.java
+++ b/core/src/main/java/org/jruby/ext/ffi/CallbackInfo.java
@@ -98,7 +98,7 @@ public CallbackInfo(Ruby runtime, RubyClass klazz, Type returnType, Type[] param
*
* @return A new CallbackInfo instance
*/
- @JRubyMethod(name = "new", meta = true, required = 2, optional = 1)
+ @JRubyMethod(name = "new", meta = true, required = 2, optional = 1, checkArity = false)
public static final IRubyObject newCallbackInfo(ThreadContext context, IRubyObject klass,
IRubyObject[] args)
{
diff --git a/core/src/main/java/org/jruby/ext/ffi/StructLayout.java b/core/src/main/java/org/jruby/ext/ffi/StructLayout.java
index 478fe546d3b..df6031920fe 100644
--- a/core/src/main/java/org/jruby/ext/ffi/StructLayout.java
+++ b/core/src/main/java/org/jruby/ext/ffi/StructLayout.java
@@ -214,7 +214,7 @@ private StructLayout(Ruby runtime, RubyClass klass, Collection fiel
this.isUnion = offset == 0 && memberList.size() > 1;
}
- @JRubyMethod(name = "new", meta = true, required = 3, optional = 1)
+ @JRubyMethod(name = "new", meta = true, required = 3, optional = 1, checkArity = false)
public static final IRubyObject newStructLayout(ThreadContext context, IRubyObject klass,
IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 3, 4);
@@ -649,7 +649,7 @@ void init(IRubyObject[] args, FieldIO io) {
init(args[0], args[2], args[1], io);
}
- @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1)
+ @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1, checkArity = false)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 3, 4);
@@ -831,7 +831,7 @@ public FunctionField(Ruby runtime, RubyClass klass) {
}
@Override
- @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1)
+ @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1, checkArity = false)
public final IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 3, 4);
@@ -854,7 +854,7 @@ public InnerStructField(Ruby runtime, RubyClass klass) {
}
@Override
- @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1)
+ @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1, checkArity = false)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 3, 4);
@@ -878,7 +878,7 @@ public ArrayField(Ruby runtime, RubyClass klass) {
}
@Override
- @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1)
+ @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1, checkArity = false)
public final IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 3, 4);
diff --git a/core/src/main/java/org/jruby/ext/ffi/jffi/Function.java b/core/src/main/java/org/jruby/ext/ffi/jffi/Function.java
index 8e76ef3be66..71a45d0965d 100644
--- a/core/src/main/java/org/jruby/ext/ffi/jffi/Function.java
+++ b/core/src/main/java/org/jruby/ext/ffi/jffi/Function.java
@@ -69,7 +69,7 @@ public static RubyClass createFunctionClass(Ruby runtime, RubyModule module) {
getSingletonClass().addMethod("call", createDynamicMethod(getSingletonClass()));
}
- @JRubyMethod(name = { "new" }, meta = true, required = 2, optional = 2)
+ @JRubyMethod(name = { "new" }, meta = true, required = 2, optional = 2, checkArity = false)
public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 2, 4);
diff --git a/core/src/main/java/org/jruby/ext/jruby/JRubyExecutionContextLocal.java b/core/src/main/java/org/jruby/ext/jruby/JRubyExecutionContextLocal.java
index 357b5a38c3a..436fb8ed071 100644
--- a/core/src/main/java/org/jruby/ext/jruby/JRubyExecutionContextLocal.java
+++ b/core/src/main/java/org/jruby/ext/jruby/JRubyExecutionContextLocal.java
@@ -49,7 +49,7 @@ public JRubyExecutionContextLocal(Ruby runtime, RubyClass type) {
default_proc = null;
}
- @JRubyMethod(name = "initialize", optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "initialize", optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {
if (block.isGiven()) {
if (args.length != 0) {
diff --git a/core/src/main/java/org/jruby/ext/jruby/JRubyLibrary.java b/core/src/main/java/org/jruby/ext/jruby/JRubyLibrary.java
index e36a97710be..eb02fb527bf 100644
--- a/core/src/main/java/org/jruby/ext/jruby/JRubyLibrary.java
+++ b/core/src/main/java/org/jruby/ext/jruby/JRubyLibrary.java
@@ -156,7 +156,7 @@ public static IRubyObject with_current_runtime_as_global(ThreadContext context,
}
}
- @JRubyMethod(module = true, rest = true, optional = 1) // (loader = JRuby.runtime.jruby_class_loader)
+ @JRubyMethod(module = true, rest = true) // (loader = JRuby.runtime.jruby_class_loader)
public static IRubyObject set_context_class_loader(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
final ClassLoader loader;
if (args.length == 0 || args[0] == context.nil) {
@@ -194,7 +194,7 @@ public static IRubyObject identity_hash(ThreadContext context, IRubyObject recv,
return context.runtime.newFixnum(System.identityHashCode(obj));
}
- @JRubyMethod(module = true, name = "parse", alias = "ast_for", required = 1, optional = 3)
+ @JRubyMethod(module = true, name = "parse", alias = "ast_for", required = 1, optional = 3, checkArity = false)
public static IRubyObject parse(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
// def parse(content = nil, filename = DEFAULT_FILENAME, extra_position_info = false, lineno = 0, &block)
return Java.wrapJavaObject(context.runtime, parseImpl(context, args, block));
@@ -245,7 +245,7 @@ private static Node parseImpl(ThreadContext context, IRubyObject[] args, Block b
return parseResult;
}
- @JRubyMethod(module = true, name = "compile_ir", required = 1, optional = 3)
+ @JRubyMethod(module = true, name = "compile_ir", required = 1, optional = 3, checkArity = false)
public static IRubyObject compile_ir(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
// def compile_ir(content = nil, filename = DEFAULT_FILENAME, extra_position_info = false, &block)
return Java.wrapJavaObject(context.runtime, compileIR(context, args, block));
@@ -260,7 +260,7 @@ private static IRScriptBody compileIR(ThreadContext context, IRubyObject[] args,
return scope;
}
- @JRubyMethod(module = true, name = "compile", required = 1, optional = 3)
+ @JRubyMethod(module = true, name = "compile", required = 1, optional = 3, checkArity = false)
public static IRubyObject compile(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
// def compile(content = nil, filename = DEFAULT_FILENAME, extra_position_info = false, &block)
diff --git a/core/src/main/java/org/jruby/ext/jruby/JRubyUtilLibrary.java b/core/src/main/java/org/jruby/ext/jruby/JRubyUtilLibrary.java
index 2a3c251fb74..614e08525bd 100644
--- a/core/src/main/java/org/jruby/ext/jruby/JRubyUtilLibrary.java
+++ b/core/src/main/java/org/jruby/ext/jruby/JRubyUtilLibrary.java
@@ -120,7 +120,7 @@ public static IRubyObject load_java_class(ThreadContext context, IRubyObject rec
* @param args (name, raw: false, path: false)
* @return an enumerable of class-loader resources
*/ // used from RGs' JRuby defaults (as well as jar_dependencies)
- @JRubyMethod(module = true, name = "class_loader_resources", alias = "classloader_resources", required = 1, optional = 1)
+ @JRubyMethod(module = true, name = "class_loader_resources", alias = "classloader_resources", required = 1, optional = 1, checkArity = false)
public static IRubyObject class_loader_resources(ThreadContext context, IRubyObject recv, IRubyObject... args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/pathname/RubyPathname.java b/core/src/main/java/org/jruby/ext/pathname/RubyPathname.java
index bf2136c7243..ebc6550f617 100644
--- a/core/src/main/java/org/jruby/ext/pathname/RubyPathname.java
+++ b/core/src/main/java/org/jruby/ext/pathname/RubyPathname.java
@@ -256,7 +256,7 @@ public IRubyObject inspect(ThreadContext context) {
return context.runtime.newString("#");
}
- @JRubyMethod(required = 1, optional = 1, writes = BACKREF)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, writes = BACKREF)
public IRubyObject sub(ThreadContext context, IRubyObject[] args, Block block) {
IRubyObject result = sites(context).sub.call(context, this, getPath(), args, block);
return newInstance(context, result);
@@ -271,7 +271,7 @@ public IRubyObject sub_ext(ThreadContext context, IRubyObject newExt) {
/* Facade for File */
- @JRubyMethod(alias = "fnmatch?", required = 1, optional = 1)
+ @JRubyMethod(alias = "fnmatch?", required = 1, optional = 1, checkArity = false)
public IRubyObject fnmatch(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -293,7 +293,7 @@ public IRubyObject make_symlink(ThreadContext context, IRubyObject old) {
/* Facade for IO */
- @JRubyMethod(optional = 3)
+ @JRubyMethod(optional = 3, checkArity = false)
public IRubyObject each_line(ThreadContext context, IRubyObject[] args, Block block) {
return context.runtime.getIO().callMethod(context, "foreach", unshiftPath(args), block);
}
@@ -305,7 +305,7 @@ public static IRubyObject getwd(ThreadContext context, IRubyObject recv) {
return newInstance(context, context.runtime.getDir().callMethod("getwd"));
}
- @JRubyMethod(required = 1, optional = 2, meta = true)
+ @JRubyMethod(required = 1, optional = 2, checkArity = false, meta = true)
public static IRubyObject glob(ThreadContext context, IRubyObject recv, IRubyObject[] args,
Block block) {
// TODO: yield block while iterating
@@ -319,7 +319,7 @@ public static IRubyObject glob(ThreadContext context, IRubyObject recv, IRubyObj
}
}
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public IRubyObject glob(ThreadContext context, IRubyObject[] _args, Block block) {
int argc = Arity.checkArgumentCount(context, _args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/set/RubySet.java b/core/src/main/java/org/jruby/ext/set/RubySet.java
index 3b97baf08ed..cfb6c088e1c 100644
--- a/core/src/main/java/org/jruby/ext/set/RubySet.java
+++ b/core/src/main/java/org/jruby/ext/set/RubySet.java
@@ -309,7 +309,7 @@ public IRubyObject initialize_dup(ThreadContext context, IRubyObject orig) {
return this;
}
- @JRubyMethod(frame = true, keywords = true, required = 1, optional = 1)
+ @JRubyMethod(frame = true, keywords = true, required = 1, optional = 1, checkArity = false)
public IRubyObject initialize_clone(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/set/RubySortedSet.java b/core/src/main/java/org/jruby/ext/set/RubySortedSet.java
index 8ea383a584b..e567f68fcf6 100644
--- a/core/src/main/java/org/jruby/ext/set/RubySortedSet.java
+++ b/core/src/main/java/org/jruby/ext/set/RubySortedSet.java
@@ -158,7 +158,7 @@ public IRubyObject initialize_dup(ThreadContext context, IRubyObject orig) {
return this;
}
- @JRubyMethod(frame = true, keywords = true, required = 1, optional = 1)
+ @JRubyMethod(frame = true, keywords = true, required = 1, optional = 1, checkArity = false)
public IRubyObject initialize_clone(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/socket/Addrinfo.java b/core/src/main/java/org/jruby/ext/socket/Addrinfo.java
index c8d66ada85b..40dcd86bea2 100644
--- a/core/src/main/java/org/jruby/ext/socket/Addrinfo.java
+++ b/core/src/main/java/org/jruby/ext/socket/Addrinfo.java
@@ -133,7 +133,7 @@ public IRubyObject initialize(ThreadContext context, IRubyObject _sockaddr, IRub
return context.nil;
}
- @JRubyMethod(required = 1, optional = 3, visibility = Visibility.PRIVATE)
+ @JRubyMethod(required = 1, optional = 3, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
switch (args.length) {
case 1:
diff --git a/core/src/main/java/org/jruby/ext/socket/RubyBasicSocket.java b/core/src/main/java/org/jruby/ext/socket/RubyBasicSocket.java
index 0742d831f63..44a2d06c8e6 100644
--- a/core/src/main/java/org/jruby/ext/socket/RubyBasicSocket.java
+++ b/core/src/main/java/org/jruby/ext/socket/RubyBasicSocket.java
@@ -189,7 +189,7 @@ public IRubyObject recv(ThreadContext context, IRubyObject length) {
return recv(context, length, null, null);
}
- @JRubyMethod(required = 1, optional = 2) // (length) required = 1 handled above
+ @JRubyMethod(required = 1, optional = 2, checkArity = false) // (length) required = 1 handled above
public IRubyObject recv(ThreadContext context, IRubyObject[] args) {
IRubyObject length; RubyString str; IRubyObject flags;
@@ -250,7 +250,7 @@ private IRubyObject recv(ThreadContext context, IRubyObject length,
return RubyString.newString(runtime, bytes);
}
- @JRubyMethod(required = 1, optional = 3)
+ @JRubyMethod(required = 1, optional = 3, checkArity = false)
public IRubyObject recv_nonblock(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 4);
@@ -320,7 +320,7 @@ private IRubyObject handleReturnBytes(Ruby runtime, ByteList bytes, IRubyObject
}
@Override
- @JRubyMethod(required = 1, optional = 2)
+ @JRubyMethod(required = 1, optional = 2, checkArity = false)
public IRubyObject read_nonblock(ThreadContext context, IRubyObject[] args) {
Ruby runtime = context.runtime;
Channel channel = getChannel();
@@ -616,7 +616,7 @@ public IRubyObject remote_address(ThreadContext context) {
throw runtime.newErrnoENOTCONNError();
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject shutdown(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
diff --git a/core/src/main/java/org/jruby/ext/socket/RubySocket.java b/core/src/main/java/org/jruby/ext/socket/RubySocket.java
index 7354c3b4700..eefa175d8b4 100644
--- a/core/src/main/java/org/jruby/ext/socket/RubySocket.java
+++ b/core/src/main/java/org/jruby/ext/socket/RubySocket.java
@@ -242,7 +242,7 @@ public IRubyObject recvfrom(ThreadContext context, IRubyObject _length, IRubyObj
return recvfrom(context, _length);
}
- @JRubyMethod(required = 1, optional = 3)
+ @JRubyMethod(required = 1, optional = 3, checkArity = false)
public IRubyObject recvfrom_nonblock(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 4);
@@ -262,7 +262,7 @@ public IRubyObject accept(ThreadContext context) {
throw SocketUtils.sockerr(context.runtime, JRUBY_SERVER_SOCKET_ERROR);
}
- @JRubyMethod(notImplemented = true, optional = 1)
+ @JRubyMethod(notImplemented = true, optional = 1, checkArity = false)
public IRubyObject accept_nonblock(ThreadContext context, IRubyObject[] args) {
throw SocketUtils.sockerr(context.runtime, JRUBY_SERVER_SOCKET_ERROR);
}
@@ -294,14 +294,14 @@ public static IRubyObject getifaddrs(ThreadContext context, IRubyObject recv) {
return list;
}
- @JRubyMethod(required = 1, rest = true, meta = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, meta = true)
public static IRubyObject gethostbyaddr(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
return SocketUtils.gethostbyaddr(context, args);
}
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject getservbyname(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -334,14 +334,14 @@ public static IRubyObject gethostbyname(ThreadContext context, IRubyObject recv,
return SocketUtils.gethostbyname(context, hostname);
}
- @JRubyMethod(required = 2, optional = 5, meta = true)
+ @JRubyMethod(required = 2, optional = 5, checkArity = false, meta = true)
public static IRubyObject getaddrinfo(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 2, 7);
return SocketUtils.getaddrinfo(context, args);
}
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject getnameinfo(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/socket/RubyTCPServer.java b/core/src/main/java/org/jruby/ext/socket/RubyTCPServer.java
index 3aaa69e5b46..494610bc2ed 100644
--- a/core/src/main/java/org/jruby/ext/socket/RubyTCPServer.java
+++ b/core/src/main/java/org/jruby/ext/socket/RubyTCPServer.java
@@ -72,7 +72,7 @@ public RubyTCPServer(Ruby runtime, RubyClass type) {
super(runtime, type);
}
- @JRubyMethod(name = "initialize", required = 1, optional = 1, visibility = Visibility.PRIVATE)
+ @JRubyMethod(name = "initialize", required = 1, optional = 1, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
Ruby runtime = context.runtime;
IRubyObject _host;
diff --git a/core/src/main/java/org/jruby/ext/socket/RubyTCPSocket.java b/core/src/main/java/org/jruby/ext/socket/RubyTCPSocket.java
index c69e019d322..8180f585338 100644
--- a/core/src/main/java/org/jruby/ext/socket/RubyTCPSocket.java
+++ b/core/src/main/java/org/jruby/ext/socket/RubyTCPSocket.java
@@ -145,7 +145,7 @@ public IRubyObject initialize(ThreadContext context, IRubyObject host, IRubyObje
}
- @JRubyMethod(required = 2, optional = 3, visibility = Visibility.PRIVATE)
+ @JRubyMethod(required = 2, optional = 3, checkArity = false, visibility = Visibility.PRIVATE)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 5);
diff --git a/core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java b/core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java
index 4b1f5136e58..0278c181c16 100644
--- a/core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java
+++ b/core/src/main/java/org/jruby/ext/socket/RubyUDPSocket.java
@@ -262,7 +262,7 @@ private DatagramChannel getDatagramChannel() {
return (DatagramChannel) getChannel();
}
- @JRubyMethod(required = 1, optional = 3)
+ @JRubyMethod(required = 1, optional = 3, checkArity = false)
public IRubyObject recvfrom_nonblock(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, 4);
@@ -361,7 +361,7 @@ public IRubyObject send(ThreadContext context, IRubyObject _mesg, IRubyObject _f
}
}
- @JRubyMethod(required = 2, optional = 2)
+ @JRubyMethod(required = 2, optional = 2, checkArity = false)
public IRubyObject send(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 2, 4);
diff --git a/core/src/main/java/org/jruby/ext/socket/RubyUNIXSocket.java b/core/src/main/java/org/jruby/ext/socket/RubyUNIXSocket.java
index fb83ec47f5f..0c8577739cd 100644
--- a/core/src/main/java/org/jruby/ext/socket/RubyUNIXSocket.java
+++ b/core/src/main/java/org/jruby/ext/socket/RubyUNIXSocket.java
@@ -121,7 +121,7 @@ public IRubyObject peeraddr(ThreadContext context) {
return runtime.newArray( runtime.newString("AF_UNIX"), path );
}
- @JRubyMethod(name = "recvfrom", required = 1, optional = 1)
+ @JRubyMethod(name = "recvfrom", required = 1, optional = 1, checkArity = false)
public IRubyObject recvfrom(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -206,7 +206,7 @@ public IRubyObject send_io(ThreadContext context, IRubyObject arg) {
return runtime.getNil();
}
- @JRubyMethod(optional = 2)
+ @JRubyMethod(optional = 2, checkArity = false)
public IRubyObject recv_io(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 2);
@@ -265,7 +265,7 @@ public IRubyObject recv_io(ThreadContext context, IRubyObject[] args) {
}
}
- @JRubyMethod(name = {"socketpair", "pair"}, optional = 2, meta = true)
+ @JRubyMethod(name = {"socketpair", "pair"}, optional = 2, checkArity = false, meta = true)
public static IRubyObject socketpair(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 0, 2);
diff --git a/core/src/main/java/org/jruby/ext/tempfile/Tempfile.java b/core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
index 34e107c1971..11fcc1a4e72 100644
--- a/core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
+++ b/core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
@@ -76,7 +76,7 @@ public Tempfile(Ruby runtime, RubyClass type) {
super(runtime, type);
}
- @JRubyMethod(optional = 4, visibility = Visibility.PRIVATE, keywords = true)
+ @JRubyMethod(optional = 4, checkArity = false, visibility = Visibility.PRIVATE, keywords = true)
@Override
public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block unused) {
Arity.checkArgumentCount(context, args, 0, 4);
@@ -162,7 +162,7 @@ public IRubyObject _close(ThreadContext context) {
return !isClosed() ? super.close(context) : context.nil;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject close(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -236,7 +236,7 @@ public static IRubyObject open19(ThreadContext context, IRubyObject recv, IRubyO
return open(context, recv, args, block);
}
- @JRubyMethod(optional = 4, meta = true, keywords = true)
+ @JRubyMethod(optional = 4, checkArity = false, meta = true, keywords = true)
public static IRubyObject open(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
RubyClass klass = (RubyClass) recv;
Tempfile tempfile = (Tempfile) klass.newInstance(context, args, block);
diff --git a/core/src/main/java/org/jruby/ext/thread/SizedQueue.java b/core/src/main/java/org/jruby/ext/thread/SizedQueue.java
index fc19ef15983..c8f12e0618d 100644
--- a/core/src/main/java/org/jruby/ext/thread/SizedQueue.java
+++ b/core/src/main/java/org/jruby/ext/thread/SizedQueue.java
@@ -130,7 +130,7 @@ public RubyNumeric num_waiting(ThreadContext context) {
}
}
- @JRubyMethod(name = {"push", "<<", "enq"}, required = 1, optional = 1)
+ @JRubyMethod(name = {"push", "<<", "enq"}, required = 1, optional = 1, checkArity = false)
public IRubyObject push(ThreadContext context, final IRubyObject[] argv) {
initializedCheck();
diff --git a/core/src/main/java/org/jruby/ext/zlib/JZlibDeflate.java b/core/src/main/java/org/jruby/ext/zlib/JZlibDeflate.java
index d423cc2f734..bc04bd85b19 100644
--- a/core/src/main/java/org/jruby/ext/zlib/JZlibDeflate.java
+++ b/core/src/main/java/org/jruby/ext/zlib/JZlibDeflate.java
@@ -57,7 +57,7 @@ public class JZlibDeflate extends ZStream {
private com.jcraft.jzlib.Deflater flater = null;
private int flush = JZlib.Z_NO_FLUSH;
- @JRubyMethod(name = "deflate", required = 1, optional = 1, meta = true)
+ @JRubyMethod(name = "deflate", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject s_deflate(IRubyObject recv, IRubyObject[] args) {
Ruby runtime = recv.getRuntime();
args = Arity.scanArgs(runtime, args, 1, 1);
@@ -84,7 +84,7 @@ public JZlibDeflate(Ruby runtime, RubyClass type) {
super(runtime, type);
}
- @JRubyMethod(name = "initialize", optional = 4, visibility = PRIVATE)
+ @JRubyMethod(name = "initialize", optional = 4, checkArity = false, visibility = PRIVATE)
public IRubyObject _initialize(IRubyObject[] args) {
args = Arity.scanArgs(getRuntime(), args, 0, 4);
level = -1;
@@ -206,7 +206,7 @@ public IRubyObject set_dictionary(ThreadContext context, IRubyObject arg) {
}
}
- @JRubyMethod(name = "flush", optional = 1)
+ @JRubyMethod(name = "flush", optional = 1, checkArity = false)
public IRubyObject flush(IRubyObject[] args) {
int argc = Arity.checkArgumentCount(getRuntime(), args, 0, 1);
@@ -217,7 +217,7 @@ public IRubyObject flush(IRubyObject[] args) {
return flush(flush);
}
- @JRubyMethod(name = "deflate", required = 1, optional = 1)
+ @JRubyMethod(name = "deflate", required = 1, optional = 1, checkArity = false)
public IRubyObject deflate(IRubyObject[] args) {
args = Arity.scanArgs(getRuntime(), args, 1, 1);
if (internalFinished()) throw RubyZlib.newStreamError(getRuntime(), "stream error");
diff --git a/core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java b/core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java
index 8f3ebbc878c..06148dfed4e 100644
--- a/core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java
+++ b/core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java
@@ -70,7 +70,7 @@ public static IRubyObject s_inflate(ThreadContext context, IRubyObject recv, IRu
}
}
- @JRubyMethod(name = "initialize", optional = 1, visibility = PRIVATE)
+ @JRubyMethod(name = "initialize", optional = 1, checkArity = false, visibility = PRIVATE)
public IRubyObject _initialize(IRubyObject[] args) {
int argc = Arity.checkArgumentCount(getRuntime(), args, 0, 1);
diff --git a/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipReader.java b/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipReader.java
index a0ec5ea8029..abb0125d327 100644
--- a/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipReader.java
+++ b/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipReader.java
@@ -90,7 +90,7 @@ public static JZlibRubyGzipReader newInstance(IRubyObject recv, IRubyObject[] ar
return result;
}
- @JRubyMethod(name = "open", required = 1, optional = 1, meta = true)
+ @JRubyMethod(name = "open", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject open19(final ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
Arity.checkArgumentCount(context, args, 1, 2);
@@ -142,7 +142,7 @@ public IRubyObject initialize(ThreadContext context, IRubyObject stream) {
return this;
}
- @JRubyMethod(name = "initialize", required = 1, optional = 1, visibility = PRIVATE)
+ @JRubyMethod(name = "initialize", required = 1, optional = 1, checkArity = false, visibility = PRIVATE)
public IRubyObject initialize19(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
@@ -307,7 +307,7 @@ public IRubyObject gets_18(ThreadContext context, IRubyObject[] args) {
return gets(context, args);
}
- @JRubyMethod(name = "gets", optional = 2, writes = FrameField.LASTLINE)
+ @JRubyMethod(name = "gets", optional = 2, checkArity = false, writes = FrameField.LASTLINE)
public IRubyObject gets(ThreadContext context, IRubyObject[] args) {
try {
IRubyObject result = internalGets(args);
@@ -321,7 +321,7 @@ public IRubyObject gets(ThreadContext context, IRubyObject[] args) {
}
private final static int BUFF_SIZE = 4096;
- @JRubyMethod(name = "read", optional = 1)
+ @JRubyMethod(name = "read", optional = 1, checkArity = false)
public IRubyObject read(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -361,7 +361,7 @@ public IRubyObject read(ThreadContext context, IRubyObject[] args) {
}
}
- @JRubyMethod(name = "readpartial", required = 1, optional = 1)
+ @JRubyMethod(name = "readpartial", required = 1, optional = 1, checkArity = false)
public IRubyObject readpartial(IRubyObject[] args) {
Ruby runtime = getRuntime();
@@ -642,7 +642,7 @@ public IRubyObject comment() {
return super.comment();
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject each(ThreadContext context, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -665,7 +665,7 @@ public IRubyObject each(ThreadContext context, IRubyObject[] args, Block block)
return context.nil;
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject each_line(ThreadContext context, IRubyObject[] args, Block block) {
if (!block.isGiven()) return RubyEnumerator.enumeratorize(context.runtime, this, "each_line", args);
@@ -706,7 +706,7 @@ public IRubyObject ungetbyte(IRubyObject b) {
return getRuntime().getNil();
}
- @JRubyMethod(optional = 1)
+ @JRubyMethod(optional = 1, checkArity = false)
public IRubyObject readlines(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 0, 1);
@@ -768,7 +768,7 @@ public IRubyObject each_byte(ThreadContext context, Block block) {
* If a block is not given, the method returns the concatenation of
* all uncompressed data in all gzip streams.
*/
- @JRubyMethod(required = 1, optional = 1, meta = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject zcat(ThreadContext context, IRubyObject klass, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 2);
diff --git a/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipWriter.java b/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipWriter.java
index a3ffb489951..f8b84022efa 100644
--- a/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipWriter.java
+++ b/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipWriter.java
@@ -78,7 +78,7 @@ public static JZlibRubyGzipWriter newInstance(IRubyObject recv, IRubyObject[] ar
return result;
}
- @JRubyMethod(name = "open", required = 1, optional = 3, meta = true)
+ @JRubyMethod(name = "open", required = 1, optional = 3, checkArity = false, meta = true)
public static IRubyObject open19(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
int argc = Arity.checkArgumentCount(context, args, 1, 4);
@@ -197,7 +197,7 @@ public IRubyObject append(IRubyObject p1) {
return this;
}
- @JRubyMethod(name = "printf", required = 1, rest = true)
+ @JRubyMethod(name = "printf", required = 1, rest = true, checkArity = false)
public IRubyObject printf(ThreadContext context, IRubyObject[] args) {
write(RubyKernel.sprintf(context, this, args));
@@ -291,7 +291,7 @@ public IRubyObject finish() {
return realIo;
}
- @JRubyMethod(name = "flush", optional = 1)
+ @JRubyMethod(name = "flush", optional = 1, checkArity = false)
public IRubyObject flush(IRubyObject[] args) {
int argc = Arity.checkArgumentCount(getRuntime(), args, 0, 1);
diff --git a/core/src/main/java/org/jruby/ext/zlib/RubyGzipFile.java b/core/src/main/java/org/jruby/ext/zlib/RubyGzipFile.java
index 157c8e347eb..e971a2e2536 100644
--- a/core/src/main/java/org/jruby/ext/zlib/RubyGzipFile.java
+++ b/core/src/main/java/org/jruby/ext/zlib/RubyGzipFile.java
@@ -82,7 +82,7 @@ public static IRubyObject wrap(ThreadContext context, IRubyObject recv, IRubyObj
return wrap19(context, recv, new IRubyObject[]{io}, block);
}
- @JRubyMethod(meta = true, name = "wrap", required = 1, optional = 1)
+ @JRubyMethod(meta = true, name = "wrap", required = 1, optional = 1, checkArity = false)
public static IRubyObject wrap19(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
Ruby runtime = recv.getRuntime();
RubyGzipFile instance;
diff --git a/core/src/main/java/org/jruby/ext/zlib/RubyZlib.java b/core/src/main/java/org/jruby/ext/zlib/RubyZlib.java
index 0f0a34ca7dd..49585dd5320 100644
--- a/core/src/main/java/org/jruby/ext/zlib/RubyZlib.java
+++ b/core/src/main/java/org/jruby/ext/zlib/RubyZlib.java
@@ -183,7 +183,7 @@ public static IRubyObject zlib_version(IRubyObject recv) {
return ((RubyModule)recv).getConstant("ZLIB_VERSION");
}
- @JRubyMethod(name = "crc32", optional = 2, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "crc32", optional = 2, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject crc32(IRubyObject recv, IRubyObject[] args) {
args = Arity.scanArgs(recv.getRuntime(),args,0,2);
long start = 0;
@@ -206,7 +206,7 @@ public static IRubyObject crc32(IRubyObject recv, IRubyObject[] args) {
return recv.getRuntime().newFixnum(result);
}
- @JRubyMethod(name = "adler32", optional = 2, module = true, visibility = PRIVATE)
+ @JRubyMethod(name = "adler32", optional = 2, checkArity = false, module = true, visibility = PRIVATE)
public static IRubyObject adler32(IRubyObject recv, IRubyObject[] args) {
args = Arity.scanArgs(recv.getRuntime(),args,0,2);
int start = 1;
@@ -230,7 +230,7 @@ public static IRubyObject inflate(ThreadContext context, IRubyObject recv, IRuby
return JZlibInflate.s_inflate(context, recv, string);
}
- @JRubyMethod(required = 1, optional = 1, module = true)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false, module = true)
public static IRubyObject deflate(IRubyObject recv, IRubyObject[] args) {
return JZlibDeflate.s_deflate(recv, args);
}
diff --git a/core/src/main/java/org/jruby/java/addons/ClassJavaAddons.java b/core/src/main/java/org/jruby/java/addons/ClassJavaAddons.java
index 4a1b79f7f02..611ede67306 100644
--- a/core/src/main/java/org/jruby/java/addons/ClassJavaAddons.java
+++ b/core/src/main/java/org/jruby/java/addons/ClassJavaAddons.java
@@ -66,7 +66,7 @@ public static IRubyObject become_java(ThreadContext context, final IRubyObject s
return becomeJava(context, (RubyClass) self, null, true);
}
- @JRubyMethod(name = "become_java!", required = 1, optional = 1)
+ @JRubyMethod(name = "become_java!", required = 1, optional = 1, checkArity = false)
public static IRubyObject become_java(ThreadContext context, final IRubyObject self, final IRubyObject[] args) {
final RubyClass klass = (RubyClass) self;
diff --git a/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxy.java b/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxy.java
index fd7ffda1eec..f7c32da91ed 100644
--- a/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxy.java
+++ b/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxy.java
@@ -104,7 +104,7 @@ public final IRubyObject op_aref(ThreadContext context, IRubyObject arg) {
return ArrayUtils.arefDirect(context.runtime, getObject(), converter, i);
}
- @JRubyMethod(name = "[]", required = 1, rest = true)
+ @JRubyMethod(name = "[]", required = 1, rest = true, checkArity = false)
public final IRubyObject op_aref(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -396,7 +396,7 @@ public IRubyObject count(final ThreadContext context, final IRubyObject obj, fin
return RubyFixnum.newFixnum(runtime, count);
}
- @JRubyMethod(name = "dig", required = 1, rest = true)
+ @JRubyMethod(name = "dig", required = 1, rest = true, checkArity = false)
public final IRubyObject dig(ThreadContext context, IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxyCreator.java b/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxyCreator.java
index d77a30fca4f..90e352ffe71 100644
--- a/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxyCreator.java
+++ b/core/src/main/java/org/jruby/java/proxies/ArrayJavaProxyCreator.java
@@ -47,7 +47,7 @@ private ArrayJavaProxyCreator(final Ruby runtime, Class> elementType) {
this.elementType = elementType;
}
- @JRubyMethod(name = "[]", required = 1, rest = true)
+ @JRubyMethod(name = "[]", required = 1, rest = true, checkArity = false)
public final IRubyObject op_aref(ThreadContext context, IRubyObject[] sizes) {
Arity.checkArgumentCount(context.runtime, sizes, 1, -1);
aggregateDimensions(sizes);
diff --git a/core/src/main/java/org/jruby/java/proxies/JavaProxy.java b/core/src/main/java/org/jruby/java/proxies/JavaProxy.java
index ae715431719..78daa90c74a 100644
--- a/core/src/main/java/org/jruby/java/proxies/JavaProxy.java
+++ b/core/src/main/java/org/jruby/java/proxies/JavaProxy.java
@@ -400,7 +400,7 @@ public IRubyObject java_send(ThreadContext context, IRubyObject rubyName, IRubyO
return method.invokeDirect(context, getObject(), arg0.toJava(argTypeClass));
}
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public IRubyObject java_send(ThreadContext context, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
@@ -661,7 +661,7 @@ public static IRubyObject java_send(ThreadContext context, IRubyObject recv, IRu
return method.invokeStaticDirect(context, arg0.toJava(argTypeClass));
}
- @JRubyMethod(required = 1, rest = true, meta = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false, meta = true)
public static IRubyObject java_send(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
int argc = Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/java/proxies/MapJavaProxy.java b/core/src/main/java/org/jruby/java/proxies/MapJavaProxy.java
index fecdb7981b1..67a0c87983a 100644
--- a/core/src/main/java/org/jruby/java/proxies/MapJavaProxy.java
+++ b/core/src/main/java/org/jruby/java/proxies/MapJavaProxy.java
@@ -813,12 +813,12 @@ public IRubyObject rbClone() {
return dupImpl("clone");
}
- @JRubyMethod(name = "any?", optional = 1)
+ @JRubyMethod(name = "any?", optional = 1, checkArity = false)
public IRubyObject any_p(ThreadContext context, IRubyObject[] args, Block block) {
return getOrCreateRubyHashMap(context.runtime).any_p(context, args, block);
}
- @JRubyMethod(name = "dig", required = 1, rest = true)
+ @JRubyMethod(name = "dig", required = 1, rest = true, checkArity = false)
public IRubyObject dig(ThreadContext context, IRubyObject[] args) {
return getOrCreateRubyHashMap(context.runtime).dig(context, args);
}
diff --git a/core/src/main/java/org/jruby/javasupport/ext/JavaLang.java b/core/src/main/java/org/jruby/javasupport/ext/JavaLang.java
index d4e5ab2148e..d29e84638e2 100644
--- a/core/src/main/java/org/jruby/javasupport/ext/JavaLang.java
+++ b/core/src/main/java/org/jruby/javasupport/ext/JavaLang.java
@@ -659,7 +659,7 @@ public static IRubyObject extend_proxy(final ThreadContext context, IRubyObject
//}
@SuppressWarnings("deprecation")
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public static IRubyObject java_method(ThreadContext context, IRubyObject self, final IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
@@ -677,7 +677,7 @@ public static IRubyObject java_method(ThreadContext context, IRubyObject self, f
}
@SuppressWarnings("deprecation")
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public static IRubyObject declared_method(ThreadContext context, IRubyObject self, final IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
@@ -694,7 +694,7 @@ public static IRubyObject declared_method(ThreadContext context, IRubyObject sel
}
}
- @JRubyMethod(required = 1, rest = true)
+ @JRubyMethod(required = 1, rest = true, checkArity = false)
public static IRubyObject declared_method_smart(ThreadContext context, IRubyObject self, final IRubyObject[] args) {
Arity.checkArgumentCount(context, args, 1, -1);
diff --git a/core/src/main/java/org/jruby/javasupport/proxy/JavaProxyConstructor.java b/core/src/main/java/org/jruby/javasupport/proxy/JavaProxyConstructor.java
index e1b4c234f39..9209b94e42c 100644
--- a/core/src/main/java/org/jruby/javasupport/proxy/JavaProxyConstructor.java
+++ b/core/src/main/java/org/jruby/javasupport/proxy/JavaProxyConstructor.java
@@ -243,7 +243,7 @@ public static RuntimeException throwInstantiationExceptionCause(final Ruby runti
return new RuntimeException("Dead code... If you see this, file a bug: JPCtIEC fail"); // greppable
}
- @JRubyMethod(required = 1, optional = 1)
+ @JRubyMethod(required = 1, optional = 1, checkArity = false)
public IRubyObject new_instance(IRubyObject[] args, Block block) {
final Ruby runtime = getRuntime();