summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ruby_assert.h2
-rw-r--r--vm_core.h3
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 77553fd..ffceb1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Jan 25 17:26:54 2016 Eric Wong <e@80x24.org>
+
+ * ruby_assert.h (RUBY_ASSERT_WHEN): fix reference to macro name
+ * vm_core.h: include ruby_assert.h before using
+ [ruby-core:73371]
+
Mon Jan 25 15:55:30 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* symbol.c (sym_check_asciionly): more informative error message
diff --git a/ruby_assert.h b/ruby_assert.h
index de80491..3383e4f 100644
--- a/ruby_assert.h
+++ b/ruby_assert.h
@@ -31,7 +31,7 @@ NORETURN(void rb_assert_failure(const char *, int, const char *, const char *));
RUBY_ASSERT_MESG(!(cond) || (expr), mesg)
#endif
#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(!RUBY_NDEBUG+0, expr, #expr)
-#define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_WHEN_0(cond, expr, #expr)
+#define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
#undef assert
#define assert RUBY_ASSERT
diff --git a/vm_core.h b/vm_core.h
index 91e65fc..7b5adbc 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -42,6 +42,8 @@
#define VMDEBUG 3
#endif
+#include "ruby_assert.h"
+
#if VM_CHECK_MODE > 0
#define VM_ASSERT(expr) ( \
RUBY_ASSERT_WHEN(VM_CHECK_MODE > 0, expr))
@@ -61,7 +63,6 @@
#include "method.h"
#include "ruby_atomic.h"
#include "ccan/list/list.h"
-#include "ruby_assert.h"
#include "ruby/thread_native.h"
#if defined(_WIN32)