mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
b001766b08
commit
5fa3c57e2f
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue