diff --git a/ChangeLog b/ChangeLog index e1c3032dc8..424a88e214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 9 11:37:19 2016 Nobuyoshi Nakada + + * vm_core.h (VM_ASSERT): stringify expr here before expansion in + RUBY_ASSERT_WHEN. + Sat Oct 8 10:54:22 2016 Nobuyoshi Nakada * ext/-test-/memory_status/memory_status.c (read_status): use diff --git a/vm_core.h b/vm_core.h index ccba902a36..f3e9a72cb0 100644 --- a/vm_core.h +++ b/vm_core.h @@ -46,7 +46,7 @@ #if VM_CHECK_MODE > 0 #define VM_ASSERT(expr) ( \ - RUBY_ASSERT_WHEN(VM_CHECK_MODE > 0, expr)) + RUBY_ASSERT_MESG_WHEN(VM_CHECK_MODE > 0, expr, #expr)) #define VM_UNREACHABLE(func) rb_bug(#func ": unreachable")