summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 15a39346dd9..4ca0e09277e 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -2352,6 +2352,24 @@ class TestModule < Test::Unit::TestCase
end;
end
+ def test_private_extended_module
+ assert_separately [], %q{
+ class Object
+ def bar; "Object#bar"; end
+ end
+ module M1
+ def bar; super; end
+ end
+ module M2
+ include M1
+ private(:bar)
+ def foo; bar; end
+ end
+ extend M2
+ assert_equal 'Object#bar', foo
+ }
+ end
+
private
def assert_top_method_is_private(method)