|
#define | RUBY_DEBUG 0 |
| Define this macro when you want assertions. More...
|
|
#define | NDEBUG |
| Define this macro when you don't want assertions. More...
|
|
#define | RUBY_NDEBUG 1 |
| This macro is basically the same as NDEBUG. More...
|
|
#define | RBIMPL_VA_OPT_ARGS(...) __VA_OPT__(,) __VA_ARGS__ |
| Prints the given message, and terminates the entire process abnormally. More...
|
|
#define | RUBY_ASSERT_FAIL(mesg, ...) |
|
#define | RUBY_ASSERT_MESG(expr, ...) (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(__VA_ARGS__)) |
| Asserts that the expression is truthy. More...
|
|
#define | RUBY_ASSERT_ALWAYS(expr, ...) RUBY_ASSERT_MESG(expr, #expr RBIMPL_VA_OPT_ARGS(__VA_ARGS__)) |
| A variant of RUBY_ASSERT that does not interface with RUBY_DEBUG. More...
|
|
#define | RUBY_ASSERT(...) RBIMPL_ASSERT_NOTHING |
| Asserts that the given expression is truthy if and only if RUBY_DEBUG is truthy. More...
|
|
#define | RUBY_ASSERT_NDEBUG(...) RBIMPL_ASSERT_NOTHING |
| A variant of RUBY_ASSERT that interfaces with NDEBUG instead of RUBY_DEBUG. More...
|
|
#define | RUBY_ASSERT_MESG_WHEN(cond, expr, ...) ((cond) ? RUBY_ASSERT_MESG((expr), __VA_ARGS__) : RBIMPL_ASSERT_NOTHING) |
| A variant of RUBY_ASSERT that asserts when either RUBY_DEBUG or cond parameter is truthy. More...
|
|
#define | RUBY_ASSERT_WHEN(cond, expr, ...) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr RBIMPL_VA_OPT_ARGS(__VA_ARGS__)) |
| A variant of RUBY_ASSERT that asserts when either RUBY_DEBUG or cond parameter is truthy. More...
|
|
#define | RUBY_ASSERT_BUILTIN_TYPE(obj, type) |
| A variant of RUBY_ASSERT that asserts when either RUBY_DEBUG or built-in type of obj is type . More...
|
|
#define | RBIMPL_ASSERT_OR_ASSUME(...) RBIMPL_ASSERT_NOTHING |
| This is either RUBY_ASSERT or RBIMPL_ASSUME, depending on RUBY_DEBUG. More...
|
|
- Author
- Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org
- Date
- Wed May 18 00:21:44 JST 1994
- Copyright
- This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.
- Warning
- Symbols prefixed with either
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.
- Note
- To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance
__VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.
Definition in file assert.h.