mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
* 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/trunk@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9acd1965d
commit
43284b6bf8
5 changed files with 39 additions and 5 deletions
|
@ -545,6 +545,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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue