diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-13 11:59:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-13 11:59:27 +0000 |
commit | 15798b606e48a478e3a8ef03547858fd320f912c (patch) | |
tree | 414c08905ddf85235d5c8bf36be0d8fb402245f9 /bootstraptest | |
parent | a7d04e536b2c140c39774fb632bd7d3d02c53c4a (diff) | |
download | ruby-15798b606e48a478e3a8ef03547858fd320f912c.tar.gz |
vm.c: initialize defined_module_hash early
* vm.c (Init_BareVM): initialize defined_module_hash here,
Init_top_self() is too late to register core classes/modules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_class.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_class.rb b/bootstraptest/test_class.rb index 664dd2f166..b7fe0a1acd 100644 --- a/bootstraptest/test_class.rb +++ b/bootstraptest/test_class.rb @@ -11,6 +11,16 @@ assert_equal 'C', %q( class C; end C.new.class.name ) assert_equal 'Class', %q( class C; end C.new.class.class ) +assert_equal 'true', %q( Object.__send__(:remove_const, :TrueClass) + GC.start + true.inspect) +assert_equal 'false', %q( Object.__send__(:remove_const, :FalseClass) + GC.start + false.inspect) +assert_equal 'nil', %q( Object.__send__(:remove_const, :NilClass) + GC.start + nil.inspect) + # inherited class assert_equal 'true', %q( class A; end |