diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-21 14:31:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-21 14:31:47 +0000 |
commit | 0590791d04c05240de1b823373f852c43eb4b602 (patch) | |
tree | ee03ce89969c119865cc5423561da83fb332ca79 | |
parent | 722ad8f2144bd20459a3858e2cb8c0e5b3559c8a (diff) |
* eval.c (rb_get_method_body, rb_alias, rb_eval): should not cache
uninitialized value, since search_method doesn't set origin if the
method wasn't found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 6 |
2 files changed, 8 insertions, 4 deletions
@@ -1,4 +1,8 @@ -Wed May 21 23:29:52 2008 Nobuyoshi Nakada <[email protected]> +Wed May 21 23:31:44 2008 Nobuyoshi Nakada <[email protected]> + + * eval.c (rb_get_method_body, rb_alias, rb_eval): should not cache + uninitialized value, since search_method doesn't set origin if the + method wasn't found. * eval.c (search_method, remove_method, error_print, rb_alias) (rb_eval, rb_rescue2, search_required, Init_eval, rb_thread_create), @@ -487,7 +487,7 @@ rb_get_method_body(klassp, idp, noexp) { ID id = *idp; VALUE klass = *klassp; - VALUE origin; + VALUE origin = 0; NODE * volatile body; struct cache_entry *ent; @@ -2161,7 +2161,7 @@ rb_alias(klass, name, def) VALUE klass; ID name, def; { - VALUE origin; + VALUE origin = 0; NODE *orig, *body, *node; VALUE singleton = 0; st_data_t data; @@ -3921,7 +3921,7 @@ rb_eval(self, n) case NODE_DEFN: if (node->nd_defn) { NODE *body, *defn; - VALUE origin; + VALUE origin = 0; int noex; if (NIL_P(ruby_class)) { |