diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-01 08:26:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-01 08:26:02 +0000 |
commit | 5fa3c57e2f374aeaac766132e182dab4d6ae9315 (patch) | |
tree | e502a89d4618b40ae5c66fb15b0428b0608d375a | |
parent | b001766b080a3572a7fae94aa0b8ab0b0a0f3ee2 (diff) | |
download | ruby-5fa3c57e2f374aeaac766132e182dab4d6ae9315.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 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); } |