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:
parent
3d9c0014e6
commit
6b7dbd3e31
3 changed files with 14 additions and 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>
|
Thu Feb 12 23:22:29 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* test/socket/test_socket.rb (test_udp_server): filter out unreachable
|
* test/socket/test_socket.rb (test_udp_server): filter out unreachable
|
||||||
|
|
|
@ -67,3 +67,12 @@ assert_finish 5, %q{
|
||||||
end
|
end
|
||||||
}, '[ruby-core:21696]'
|
}, '[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);
|
vm_check_if_namespace(cbase);
|
||||||
|
|
||||||
/* find klass */
|
/* find klass */
|
||||||
|
rb_autoload_load(cbase, id);
|
||||||
if (rb_const_defined_at(cbase, id)) {
|
if (rb_const_defined_at(cbase, id)) {
|
||||||
/* already exist */
|
/* already exist */
|
||||||
klass = rb_const_get_at(cbase, id);
|
klass = rb_const_get_at(cbase, id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue