diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-25 08:23:34 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-25 08:23:34 +0000 |
commit | 3b359789b92085ea0d1a2231b3d8ef279be9b63d (patch) | |
tree | 69c44cffc0299d0fcf8be71968e384a882fba757 /class.c | |
parent | 8640bc4bc6de045cca24be5de629ce2471eb4be4 (diff) |
* class.c (rb_include_module): detect cyclic module inclusion.
* eval.c (rb_thread_schedule): should check time only if BOTH
WAIT_SELECT and WAIT_TIME.
* string.c (rb_str_split_m): no need to consider KANJI
characters, if the length of separator is 1 (byte).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -324,6 +324,8 @@ rb_include_module(klass, module) } while (module) { + if (RCLASS(klass)->m_tbl == RCLASS(module)->m_tbl) + rb_raise(rb_eArgError, "cyclic include detected"); /* ignore if the module included already in superclasses */ for (p = RCLASS(klass)->super; p; p = RCLASS(p)->super) { if (BUILTIN_TYPE(p) == T_ICLASS && |