1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* insns.def (defineclass): try to autoload const to be overridden.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-12 15:48:44 +00:00
parent 3d9c0014e6
commit 6b7dbd3e31
3 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -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
}

View file

@ -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);