diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-15 08:55:58 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-15 08:55:58 +0000 |
commit | 601d06f3e31323c219099f9d19ee23280d653bb9 (patch) | |
tree | 23be24100ddfa8ea10edb12019e2cc3a8a69b1ce /class.c | |
parent | 7bb210b3035d2a28bcbdaec1570b019fac951ebb (diff) |
* class.c (rb_define_class): should handle autoload.
* class.c (rb_define_module): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -162,6 +162,9 @@ rb_define_class(name, super) ID id; id = rb_intern(name); + if (rb_autoload_defined(id)) { + rb_autoload_load(id); + } if (rb_const_defined(rb_cObject, id)) { klass = rb_const_get(rb_cObject, id); if (TYPE(klass) != T_CLASS) { @@ -242,6 +245,9 @@ rb_define_module(name) ID id; id = rb_intern(name); + if (rb_autoload_defined(id)) { + rb_autoload_load(id); + } if (rb_const_defined(rb_cObject, id)) { module = rb_const_get(rb_cObject, id); if (TYPE(module) == T_MODULE) |