summaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-22 06:48:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-22 06:48:18 +0000
commit2b6528582beec616f0bb4a9a38101e163009e7b7 (patch)
tree2a3fe02c8a124b8e603ac1e2aa1690dc5c322885 /class.c
parentdf88500d93888e50a65423832c49f8e89cba1aad (diff)
downloadruby-2b6528582beec616f0bb4a9a38101e163009e7b7.tar.gz
ruby-2b6528582beec616f0bb4a9a38101e163009e7b7.tar.xz
ruby-2b6528582beec616f0bb4a9a38101e163009e7b7.zip
* class.c (rb_mod_clone): should not copy class name, since clone
should remain anonymous. * eval.c (rb_call0): self in a block given to define_method now be switched to the receiver of the method. * eval.c (proc_invoke): added new parameter to allow self switching. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/class.c b/class.c
index a7911e8b9..470105438 100644
--- a/class.c
+++ b/class.c
@@ -66,7 +66,13 @@ rb_mod_clone(module)
RCLASS(clone)->super = RCLASS(module)->super;
if (RCLASS(module)->iv_tbl) {
+ ID id;
+
RCLASS(clone)->iv_tbl = st_copy(RCLASS(module)->iv_tbl);
+ id = rb_intern("__classpath__");
+ st_delete(RCLASS(clone)->iv_tbl, &id, 0);
+ id = rb_intern("__classid__");
+ st_delete(RCLASS(clone)->iv_tbl, &id, 0);
}
if (RCLASS(module)->m_tbl) {
RCLASS(clone)->m_tbl = st_init_numtable();