Hello,

2012/3/13, Marc-Andre Lafortune <ruby-core / marc-andre.ca>:
> Eric Hodel wrote:
>> Much like NameError#name and LoadError#path, why not
>> ArgumentError#expected and ArgumentError#given?  Also,
>> ArgumentError#method could return the method name called.
>
> We could have something similar to that, but we would need a subclass (say
> ArgumentNumberError or ArityError) because ArgumentErrors are not all due to
> wrong number of arguments (e.g. `[].shift(-1)`). As long as it's a subclass
> of ArgumentError, that shouldn't cause much compatibility issues.


Agreed, but let's focus on error message format in this thread.
The class design is a harder issue.

-- 
Yusuke Endoh <mame / tsg.ne.jp>