Enhance docs for Module#deprecate_constant

This commit is contained in:
zverok 2019-12-21 23:05:45 +02:00 коммит произвёл Nobuyoshi Nakada
Родитель 5a0102cb61
Коммит d339de9d1a
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -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