diff --git a/ChangeLog b/ChangeLog index 15fba1ef36..b84d79dccd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 15 23:12:36 2005 Nobuyoshi Nakada + + * eval.c (recursive_check, recursive_push): more restrictive check. + fixed: [ruby-dev:25916] + Tue Mar 15 16:38:31 2005 Hidetoshi NAGAI * ext/tk/tkutil/tkutil.c (ary2list): give wrong arguments to hash2kv() @@ -17,9 +22,9 @@ Mon Mar 14 12:21:03 2005 Hidetoshi NAGAI Mon Mar 14 00:13:49 2005 Hidetoshi NAGAI * ext/tk/lib/tk/timer.rb (TkRTTimer): correct calculation of offset - value. get a little better accuracy. + value. get a little better accuracy. - * ext/tk/sample/demos-en/widget: use a binding with no local variables + * ext/tk/sample/demos-en/widget: use a binding with no local variables when eval a sample script. * ext/tk/sample/demos-en/bind.rb: ditto. diff --git a/eval.c b/eval.c index e50bbed4f0..e2b04b7093 100644 --- a/eval.c +++ b/eval.c @@ -13002,7 +13002,7 @@ recursive_check(obj) else { VALUE list = rb_hash_aref(hash, ID2SYM(ruby_frame->this_func)); - if (NIL_P(list)) return Qfalse; + if (NIL_P(list) || TYPE(list) != T_ARRAY) return Qfalse; return rb_ary_includes(list, rb_obj_id(obj)); } } @@ -13023,7 +13023,7 @@ recursive_push(obj) else { list = rb_hash_aref(hash, sym); } - if (NIL_P(list)) { + if (NIL_P(list) || TYPE(list) != T_ARRAY) { list = rb_ary_new(); rb_hash_aset(hash, sym, list); }