Skip to content

Commit

Permalink
Restore these to rest=true as in MRI.
Browse files Browse the repository at this point in the history
This caused spec:ffi to fail because ManagedStruct attempts to do

  raise NoMethodError, "some message"

...but a previous commit of mine made NoMethodError require 2
arguments (due to a misreading of MRI docs on my part).
headius committed Feb 25, 2016
1 parent d9dc5f2 commit b856557
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyNameError.java
Original file line number Diff line number Diff line change
@@ -203,7 +203,7 @@ static RubyException newNameError(IRubyObject recv, IRubyObject message, IRubyOb
return newError;
}

@JRubyMethod(optional = 2, visibility = Visibility.PRIVATE)
@JRubyMethod(rest = true, visibility = Visibility.PRIVATE)
@Override
public IRubyObject initialize(IRubyObject[] args, Block block) {
if ( args.length > 0 ) this.message = args[0];
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyNoMethodError.java
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ public static RubyException newNoMethodError(IRubyObject recv, IRubyObject messa
return newError;
}

@JRubyMethod(required = 2, optional = 1, visibility = Visibility.PRIVATE)
@JRubyMethod(rest = true, visibility = Visibility.PRIVATE)
@Override
public IRubyObject initialize(IRubyObject[] args, Block block) {
if (args.length > 2) {

0 comments on commit b856557

Please sign in to comment.