summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-01 08:26:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-01 08:26:02 +0000
commit5fa3c57e2f374aeaac766132e182dab4d6ae9315 (patch)
treee502a89d4618b40ae5c66fb15b0428b0608d375a
parentb001766b080a3572a7fae94aa0b8ab0b0a0f3ee2 (diff)
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
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 87c2d7a8568..4876a06df3f 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);
}