mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
2bc0405d1c
commit
28b1db091d
2 changed files with 18 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Mar 13 22:19:17 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (recursive_pop): raise TypeError instead of fatal error.
|
||||||
|
fixed: [ruby-dev:25843]
|
||||||
|
|
||||||
Sun Mar 13 10:09:17 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
Sun Mar 13 10:09:17 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
||||||
|
|
||||||
* test/rinda/test_rinda.rb: remove test_gc. [ruby-dev:25871]
|
* test/rinda/test_rinda.rb: remove test_gc. [ruby-dev:25871]
|
||||||
|
|
11
eval.c
11
eval.c
|
@ -4633,7 +4633,6 @@ break_jump(retval)
|
||||||
static VALUE bmcall _((VALUE, VALUE));
|
static VALUE bmcall _((VALUE, VALUE));
|
||||||
static int method_arity _((VALUE));
|
static int method_arity _((VALUE));
|
||||||
|
|
||||||
/*:nodoc:*/
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_yield_0(val, self, klass, flags, avalue)
|
rb_yield_0(val, self, klass, flags, avalue)
|
||||||
VALUE val, self, klass; /* OK */
|
VALUE val, self, klass; /* OK */
|
||||||
|
@ -13039,11 +13038,17 @@ recursive_pop()
|
||||||
|
|
||||||
sym = ID2SYM(ruby_frame->this_func);
|
sym = ID2SYM(ruby_frame->this_func);
|
||||||
if (NIL_P(hash) || TYPE(hash) != T_HASH) {
|
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);
|
list = rb_hash_aref(hash, sym);
|
||||||
if (NIL_P(list) || TYPE(list) != T_ARRAY) {
|
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);
|
rb_ary_pop(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue