aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-02 05:36:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-02 05:36:49 +0000
commit7dddaf680710795bba628db7ca02f4d3f1a57b1c (patch)
treee53fcda157022f459185c63023a2064bbea55a6a /test
parent5e14b979476566916d2ff0dd255a6d1694ac7166 (diff)
downloadruby-7dddaf680710795bba628db7ca02f4d3f1a57b1c.tar.gz
* 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/trunk@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_module.rb28
1 files changed, 19 insertions, 9 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 7ba71852db..4edcb71ec5 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -548,15 +548,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