diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-06 06:48:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-06 06:48:25 +0000 |
commit | 88b8c7e3ffdbc0116c31b8e9691743567d6e3e34 (patch) | |
tree | f3f7b20606f3531ad43c3a75708c4dcf1c37bfee /object.c | |
parent | b516f1f25458c78974ff7dc5488b8dfaae997fae (diff) |
990806
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -465,8 +465,12 @@ rb_mod_clone(module) clone->super = RCLASS(module)->super; clone->iv_tbl = 0; clone->m_tbl = 0; /* avoid GC crashing */ - clone->iv_tbl = st_copy(RCLASS(module)->iv_tbl); - clone->m_tbl = st_copy(RCLASS(module)->m_tbl); + if (RCLASS(module)->iv_tbl) { + clone->iv_tbl = st_copy(RCLASS(module)->iv_tbl); + } + if (RCLASS(module)->m_tbl) { + clone->m_tbl = st_copy(RCLASS(module)->m_tbl); + } return (VALUE)clone; } |