summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-01 08:31:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-01 08:31:24 +0000
commit0f0db4163d632fac904fc5c0994571fc3054338a (patch)
treed0f8efcffa9f4edd24bf5f1b4d544bfeaa7c0520 /test
parent00e2e039629ef18938e6ed901d69ceadfcddc31f (diff)
* insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see
also inherited constants for classes without superclass and modules. [ruby-core:37698] [Bug #3423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_module.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index a05e11726c..eb495e280a 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -532,6 +532,20 @@ class TestModule < Test::Unit::TestCase
INPUT
end
+ 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
+ end
+
def test_class_variable_get
c = Class.new
c.class_eval('@@foo = :foo')