diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-13 13:19:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-13 13:19:28 +0000 |
commit | 28b1db091d53824322c157120b20e52b002f7c41 (patch) | |
tree | 244d2df6138e54fb0e92f6b81ab5be89428ccf22 /eval.c | |
parent | 2bc0405d1c8cff5f7ade1fbac67667c8b5d0392f (diff) |
* eval.c (recursive_pop): raise TypeError instead of fatal error.
fixed: [ruby-dev:25843]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -4633,7 +4633,6 @@ break_jump(retval) static VALUE bmcall _((VALUE, VALUE)); static int method_arity _((VALUE)); -/*:nodoc:*/ static VALUE rb_yield_0(val, self, klass, flags, avalue) VALUE val, self, klass; /* OK */ @@ -13039,11 +13038,17 @@ recursive_pop() sym = ID2SYM(ruby_frame->this_func); if (NIL_P(hash) || TYPE(hash) != T_HASH) { - rb_bug("invalid inspect_tbl hash"); + VALUE symname = rb_inspect(sym); + VALUE thrname = rb_inspect(rb_thread_current()); + rb_raise(rb_eTypeError, "invalid inspect_tbl hash for %s in %s", + StringValuePtr(symname), StringValuePtr(thrname)); } list = rb_hash_aref(hash, sym); if (NIL_P(list) || TYPE(list) != T_ARRAY) { - rb_bug("invalid inspect_tbl list"); + VALUE symname = rb_inspect(sym); + VALUE thrname = rb_inspect(rb_thread_current()); + rb_raise(rb_eTypeError, "invalid inspect_tbl list for %s in %s", + StringValuePtr(symname), StringValuePtr(thrname)); } rb_ary_pop(list); } |