Actions
Bug #15481
closedUpdate NoMethodError/NameError docs
Bug #15481:
Update NoMethodError/NameError docs
Description
- Add missing
receiver:toNoMethodError.new; - Document
receiverandprivateargument ofNoMethodError.new; - Add explanations/examples about receiver to
NameError.new; - Reformat both methods call-sequences in a modern way (
KeyError.newalready looks like this, so I took the liberty)
PS: In general, I believe that all method call-sequences should be, if possible, formatted in a "modern" way:
# bad:
new([msg, *, name [, args [, priv]]])
# good:
new(msg=nil, name=nil, args=nil, private=false, receiver: nil)
Some exceptions are, probably, legacy (pre-keyword-argument) methods with odd call-sequences, like Kernel#system which has optional FIRST argument, and described as:
system([env, ] command, ...)
Files
Actions