diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-15 14:12:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-15 14:12:53 +0000 |
commit | b1d94ab54a39f91d1b6ee9f118c11b8aae9f3ff2 (patch) | |
tree | 9a38bae8ea3435717e1f8d27033378fc87858c08 /eval.c | |
parent | 3173befe84d53d660533905eb51f86f69a4cd6b2 (diff) | |
download | ruby-b1d94ab54a39f91d1b6ee9f118c11b8aae9f3ff2.tar.gz |
* eval.c (recursive_check, recursive_push): more restrictive check.
fixed: [ruby-dev:25916]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |