1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix call-seq of NameError.new

`NameError.new(1,2,3)` raises
`wrong number of arguments (given 2, expected 0..1) (ArgumentError)`
in `StrandardError#initialize`, so NameError can't accept 3 or more arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-02-02 11:03:23 +00:00
parent 1659a1660c
commit 02d7ad9722

View file

@ -1355,7 +1355,7 @@ static VALUE name_err_initialize_options(int argc, VALUE *argv, VALUE self, VALU
/*
* call-seq:
* NameError.new([msg, *, name]) -> name_error
* NameError.new(msg [, name]) -> name_error
*
* Construct a new NameError exception. If given the <i>name</i>
* parameter may subsequently be examined using the <code>NameError.name</code>