diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-09 01:34:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-09 01:34:23 +0000 |
commit | a2bc831e15112ed8ead9a02b2540562df0e79e98 (patch) | |
tree | 853aa35e6847855ceb1ec9a38425f29ffde7e53f /compile.c | |
parent | 455dcfa963e60fd0a155210151eb272875239227 (diff) |
raise instead of rb_bug
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -627,7 +627,9 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node) DECL_ANCHOR(ret); INIT_ANCHOR(ret); - VM_ASSERT(!imemo_type_p((VALUE)node, imemo_ifunc)); + if (imemo_type_p((VALUE)node, imemo_ifunc)) { + rb_raise(rb_eArgError, "unexpected imemo_ifunc"); + } if (node == 0) { COMPILE(ret, "nil", node); @@ -9280,8 +9282,9 @@ NORETURN(static void ibf_dump_object_unsupported(struct ibf_dump *dump, VALUE ob static void ibf_dump_object_unsupported(struct ibf_dump *dump, VALUE obj) { - rb_obj_info_dump(obj); - rb_bug("ibf_dump_object_unsupported: unsupported"); + char buff[0x100]; + rb_raw_obj_info(buff, sizeof(buff), obj); + rb_raise(rb_eNotImpError, "ibf_dump_object_unsupported: %s", buff); } static VALUE @@ -9493,7 +9496,8 @@ ibf_dump_object_struct(struct ibf_dump *dump, VALUE obj) IBF_WV(range); } else { - rb_bug("ibf_dump_object_struct: unsupported class"); + rb_raise(rb_eNotImpError, "ibf_dump_object_struct: unsupported class %"PRIsVALUE, + rb_class_name(CLASS_OF(obj))); } } |