Actions
Bug #11687
closedMethod visibility changers works on frozen modules
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-11-14 trunk 52576) [x86_64-darwin15]
Description
Method visibility changers are working after freeze
.
Is this an intended behavior?
module Foo
CONSTANT = nil
def func; end
freeze
end
Foo.private_constant :CONSTANT #=> RuntimeError: can't modify frozen module
Foo.__send__ :private, :func #=> returned: Foo, expected: a RuntimeError as above
Foo.private_instance_methods #=> [:func]
Actions
Like0
Like0