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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 2e7e5804d0..9373c48a9a 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -2491,6 +2491,12 @@ class TestModule < Test::Unit::TestCase
assert_equal :M2, CloneTestC2.new.foo, '[Bug #15877]'
end
+ def test_clone_freeze
+ m = Module.new.freeze
+ assert_predicate m.clone, :frozen?
+ assert_not_predicate m.clone(freeze: false), :frozen?
+ end
+
private
def assert_top_method_is_private(method)