diff options
Diffstat (limited to 'ruby_assert.h')
| -rw-r--r-- | ruby_assert.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ruby_assert.h b/ruby_assert.h new file mode 100644 index 0000000000..fa15da1e25 --- /dev/null +++ b/ruby_assert.h @@ -0,0 +1,15 @@ +#include "ruby/assert.h" + +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) +/* C89 compilers are required to support strings of only 509 chars. */ +/* can't use RUBY_ASSERT for such compilers. */ +#include <assert.h> +#else +#undef assert +#define assert RUBY_ASSERT +#endif + +#ifdef NDEBUG + #undef RUBY_NDEBUG + #define RUBY_NDEBUG 1 +#endif |
