summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-07-22 15:35:16 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-07-22 15:35:16 +0900
commit6d742ef93aaa2cb6fe682f05c7e04cfb9be11353 (patch)
tree87f12b0e80d96436842a6dec3b09d83a6beea5f0 /src/error.c
parent4b691212846930ccc501e9050589a495901cc25c (diff)
parent3c9660257464bb78a5b094e3f7fb1621bb9577ba (diff)
downloadmruby-6d742ef93aaa2cb6fe682f05c7e04cfb9be11353.tar.gz
mruby-6d742ef93aaa2cb6fe682f05c7e04cfb9be11353.zip
Merge pull request #2482 from take-cheeze/exc_tt
Use MRB_TT_EXCEPTION in exception object.
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c
index d472f7f95..223e2137e 100644
--- a/src/error.c
+++ b/src/error.c
@@ -15,6 +15,7 @@
#include "mruby/variable.h"
#include "mruby/debug.h"
#include "mruby/error.h"
+#include "mruby/class.h"
#include "mrb_throw.h"
mrb_value
@@ -442,6 +443,7 @@ mrb_init_exception(mrb_state *mrb)
struct RClass *exception, *runtime_error, *script_error;
mrb->eException_class = exception = mrb_define_class(mrb, "Exception", mrb->object_class); /* 15.2.22 */
+ MRB_SET_INSTANCE_TT(exception, MRB_TT_EXCEPTION);
mrb_define_class_method(mrb, exception, "exception", mrb_instance_new, MRB_ARGS_ANY());
mrb_define_method(mrb, exception, "exception", exc_exception, MRB_ARGS_ANY());
mrb_define_method(mrb, exception, "initialize", exc_initialize, MRB_ARGS_ANY());