Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre1
Assignee: Thomas E Enebo
Created: 03/Jul/12 4:50 PM
Description:

Given a file `args_error.rb` with

def my_meth(a)
end

my_meth 1, 2

In JRuby, this produces:

ArgumentError: wrong number of arguments (2 for 1)
  (root) at args_error.rb:4

In MRI 1.9:

args_error.rb:1:in `my_meth': wrong number of arguments (2 for 1) (ArgumentError)
	from args_error.rb:4:in `<main>'

In MRI 1.8.7:

args_error.rb:4:in `my_meth': wrong number of arguments (2 for 1) (ArgumentError)
	from args_error.rb:4
(Only the line number change)

The MRI version (and Rbx too by the way) mentions the method name.
I think this can be helpful, to easily understand what might be the problem without needing to go to the caller place, and when the call is dynamic (#send).

For the location, 1.8 seems to mention the caller location, while 1.9 shows the callee location (and likely showing the line of the method definition in its file, which can be very helpful).

Project: JRuby
Priority: Major Major
Reporter: Benoit Daloze
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to