diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-02 05:36:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-02 05:36:49 +0000 |
commit | c526a584c8b9c132993310637aeae75129309400 (patch) | |
tree | aee9d0c57339173e661498ff4094a3954447d061 /test | |
parent | f56f03b7506268ff1fc07ee2a8d64b1cad66b492 (diff) |
* vm_insnhelper.c (vm_search_const_defined_class): search
ancestors only when global scope. [ruby-core:39227] [Bug #5264]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index eb495e280a..3258259cf7 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -535,15 +535,25 @@ class TestModule < Test::Unit::TestCase def test_const_in_module bug3423 = '[ruby-core:37698]' assert_in_out_err([], <<-INPUT, %w[ok], [], bug3423) -module LangModuleSpecInObject - module LangModuleTop - end -end -include LangModuleSpecInObject -module LangModuleTop -end -puts "ok" if LangModuleSpecInObject::LangModuleTop == LangModuleTop -INPUT + module LangModuleSpecInObject + module LangModuleTop + end + end + include LangModuleSpecInObject + module LangModuleTop + end + puts "ok" if LangModuleSpecInObject::LangModuleTop == LangModuleTop + INPUT + + bug5264 = '[ruby-core:39227]' + assert_in_out_err([], <<-'INPUT', [], [], bug5264) + class A + class X; end + end + class B < A + module X; end + end + INPUT end def test_class_variable_get |