diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-12 15:48:44 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-12 15:48:44 +0000 |
| commit | f7189473c18432139d3c597376097baf7ee5da15 (patch) | |
| tree | 76fe893ab338b299b14c79bd51593c8c92140597 | |
| parent | 607641fbd073c9ee1bfa5b0d8a06b992772419b7 (diff) | |
| download | ruby-f7189473c18432139d3c597376097baf7ee5da15.tar.gz ruby-f7189473c18432139d3c597376097baf7ee5da15.tar.xz ruby-f7189473c18432139d3c597376097baf7ee5da15.zip | |
* insns.def (defineclass): try to autoload const to be overridden.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | bootstraptest/test_autoload.rb | 9 | ||||
| -rw-r--r-- | insns.def | 1 |
3 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Fri Feb 13 00:48:42 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * insns.def (defineclass): try to autoload const to be overridden. + Thu Feb 12 23:22:29 2009 Tanaka Akira <akr@fsij.org> * test/socket/test_socket.rb (test_udp_server): filter out unreachable diff --git a/bootstraptest/test_autoload.rb b/bootstraptest/test_autoload.rb index 395153f43..fe728e1e4 100644 --- a/bootstraptest/test_autoload.rb +++ b/bootstraptest/test_autoload.rb @@ -67,3 +67,12 @@ assert_finish 5, %q{ end }, '[ruby-core:21696]' +assert_equal 'A::C', %q{ + open("zzz.rb", "w") {} + class A + autoload :C, "zzz" + class C + end + C + end +} @@ -888,6 +888,7 @@ defineclass vm_check_if_namespace(cbase); /* find klass */ + rb_autoload_load(cbase, id); if (rb_const_defined_at(cbase, id)) { /* already exist */ klass = rb_const_get_at(cbase, id); |
