summaryrefslogtreecommitdiff
path: root/include/ruby/internal/error.h
Commit message (Collapse)AuthorAgeFilesLines
* include/ruby/internal/error.h: name a parameter卜部昌平2021-09-101-2/+3
| | | | Better document [ci skip]
* include/ruby/internal/error.h: refactor move contents around [ci skip]卜部昌平2021-09-101-22/+22
|
* include/ruby/internal/error.h: add doxygen卜部昌平2021-09-101-30/+527
| | | | Must not be a bad idea to improve documents.
* sed -i 's/. They/. They/'卜部昌平2021-09-101-1/+1
| | | | | Truly editorial fix for comments. This works better with Emacs' set-justification-full function. [ci skip]
* Mark `rb_unexpected_type` as "cold" [Bug #18062]Nobuyoshi Nakada2021-08-131-1/+1
| | | | So that it will not interfere the fast path in `Check_Type`.
* Use category: :experimental in warnings that are related to experimental ↵Jeremy Evans2020-12-181-2/+3
| | | | | | | | | features This adds rb_category_compile_warn in order to emit compiler warnings with categories. Note that Ripper currently ignores the category for these warnings, but by default it ignores the warnings completely, so this shouldn't matter.
* Switch rb_category_warn{,ing} to accept an rb_warning_category_tJeremy Evans2020-12-181-2/+9
| | | | | | | | | | Since we decided to only allowing specific warning categories, there is no reason to have an API that accepts a general string, as it is more error-prone. Switch to only allowing the specific warning categories. As rb_category_warn{,ing} are public API, this requires making rb_warning_category_t public API as well.
* Add rb_category_warn{,ing} for warning messages with categoriesJeremy Evans2020-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following C-API functions that can be used to emit warnings with categories included: ```c void rb_category_warn(const char *, const char*, ...) void rb_category_warning(const char*, const char*, ...) ``` Internally in error.c, there is an rb_warn_category function that will call Warning.warn with the string and the category keyword if it doesn't have an arity of 1, and will call Warning.warn with just the string if it has an arity of 1. This refactors the rb_warn_deprecated{,_to_remove} functions to use rb_warn_category. This makes Kernel#warn accept a category keyword and pass it to Warning.warn, so that Ruby methods can more easily emit warnings with categories. rb_warn_category makes sure that the passed category is a already defined category symbol before calling Warning.warn. The only currently defined warning category is :deprecated, since that is what is already used. More categories can be added in later commits.
* sed -i 's|ruby/impl|ruby/internal|'卜部昌平2020-05-111-2/+2
| | | | To fix build failures.
* mv include/ruby/{impl,internal}卜部昌平2020-05-111-0/+74
Devs do not love "impl".