summaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-19 09:03:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-19 09:03:11 +0000
commit09b1fb78ea3397ea5c19ce35fd087f4924e4a3c4 (patch)
tree23aee851c864b85cc51a60cd34e8dc4d2f700d13 /class.c
parent513f873d17bedf7f90e1cc2ae8f0ae63f9d23d8e (diff)
downloadruby-09b1fb78ea3397ea5c19ce35fd087f4924e4a3c4.tar.gz
ruby-09b1fb78ea3397ea5c19ce35fd087f4924e4a3c4.tar.xz
ruby-09b1fb78ea3397ea5c19ce35fd087f4924e4a3c4.zip
* re.c (rb_reg_search): should clear last_match if pos is out of
string range. * string.c (rb_str_index_m): ditto. * string.c (rb_str_rindex): ditto. * class.c (rb_define_class): should handle autoload. * class.c (rb_define_module): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2225 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 e0445cd93..26b2ba7f2 100644
--- a/class.c
+++ b/class.c
@@ -184,6 +184,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) {
@@ -270,6 +273,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)