Fix Exception#message
#include "vm.h"
#include "error.h"
#include "c_string.h"
-
+#include "symbol.h"
static void c_exception_message(struct VM *vm, mrbc_value v[], int argc)
{
mrbc_decref( &v[0] );
if( vm->exc_message.tt == MRBC_TT_NIL ){
- v[0] = mrbc_string_new(vm, "", 0);
+ const char *name = mrbc_symid_to_str(v[0].cls->sym_id);
+ v[0] = mrbc_string_new(vm, name, strlen(name));
} else {
mrbc_incref( &vm->exc_message );
v[0] = vm->exc_message;
