From 5fa3c57e2f374aeaac766132e182dab4d6ae9315 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 1 Mar 2018 08:26:02 +0000 Subject: compile.c: raise on invalid input * compile.c (ibf_load_object_unsupported, ibf_load_object_class): should raise an exception. rejection of invalid input is not a bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 87c2d7a856..4876a06df3 100644 --- a/compile.c +++ b/compile.c @@ -8880,7 +8880,7 @@ ibf_dump_object_unsupported(struct ibf_dump *dump, VALUE obj) static VALUE ibf_load_object_unsupported(const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset) { - rb_bug("unsupported"); + rb_raise(rb_eArgError, "unsupported"); return Qnil; } @@ -8920,7 +8920,7 @@ ibf_load_object_class(const struct ibf_load *load, const struct ibf_object_heade return rb_eStandardError; } - rb_bug("ibf_load_object_class: unknown class (%d)", (int)cindex); + rb_raise(rb_eArgError, "ibf_load_object_class: unknown class (%d)", (int)cindex); } -- cgit v1.2.3