mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Enhance docs for Module#deprecate_constant
This commit is contained in:
parent
5a0102cb61
commit
d339de9d1a
Notes:
git
2019-12-22 23:18:03 +09:00
1 changed files with 13 additions and 1 deletions
14
variable.c
14
variable.c
|
@ -2992,7 +2992,19 @@ rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
|
|||
* call-seq:
|
||||
* mod.deprecate_constant(symbol, ...) => mod
|
||||
*
|
||||
* Makes a list of existing constants deprecated.
|
||||
* Makes a list of existing constants deprecated. Attempt
|
||||
* to refer to them will produce a warning.
|
||||
*
|
||||
* module HTTP
|
||||
* NotFound = Exception.new
|
||||
* NOT_FOUND = NotFound # previous version of the library used this name
|
||||
*
|
||||
* deprecate_constant :NOT_FOUND
|
||||
* end
|
||||
*
|
||||
* HTTP::NOT_FOUND
|
||||
* # warning: constant HTTP::NOT_FOUND is deprecated
|
||||
*
|
||||
*/
|
||||
|
||||
VALUE
|
||||
|
|
Loading…
Reference in a new issue