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:
parent
1659a1660c
commit
02d7ad9722
1 changed files with 1 additions and 1 deletions
2
error.c
2
error.c
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue