diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_class.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index e3047ccd5f..0ac29b3cf4 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -285,4 +285,18 @@ class TestClass < Test::Unit::TestCase p A.superclass RUBY end + + module M + C = 1 + + def self.m + C + end + end + + def test_constant_access_from_method_in_cloned_module # [ruby-core:47834] + m = M.dup + assert_equal 1, m::C + assert_equal 1, m.m + end end |