diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-31 05:18:43 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-31 05:18:43 +0000 |
commit | 2b98e10419af64787e8fd9ab5c0ff9ece7d23c50 (patch) | |
tree | dfd53f261ad935ffa14693c7147d4eafb63008ee /eval.c | |
parent | 2a31a00fd9a0bd8f44e4931a6f7fac445a696a90 (diff) |
* eval.c (rb_undef): undef should be done for klass, not ruby_class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1617,7 +1617,7 @@ rb_undef(klass, id) VALUE origin; NODE *body; - if (ruby_class == rb_cObject) { + if (ruby_class == rb_cObject && klass == ruby_class) { rb_secure(4); } if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) { @@ -1630,7 +1630,7 @@ rb_undef(klass, id) if (id == __id__ || id == __send__ || id == init) { rb_warn("undefining `%s' may cause serious problem", rb_id2name(id)); } - body = search_method(ruby_class, id, &origin); + body = search_method(klass, id, &origin); if (!body || !body->nd_body) { char *s0 = " class"; VALUE c = klass; |