[#70843] Re: [ruby-cvs:58952] hsbt:r51801 (trunk): * lib/rubygems: Update to RubyGems HEAD(fe61e4c112). — Eric Wong <normalperson@...>
hsbt@ruby-lang.org wrote:
3 messages
2015/09/17
[ruby-core:70828] [Ruby trunk - Bug #11532] [Open] private_constant works after module is frozen
From:
self@...
Date:
2015-09-16 08:23:03 UTC
List:
ruby-core #70828
Issue #11532 has been reported by Karol Bucek. ---------------------------------------- Bug #11532: private_constant works after module is frozen https://bugs.ruby-lang.org/issues/11532 * Author: Karol Bucek * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ... and it probably should not allow for changing constant visibility since others such as `const_set` honour `freeze` ``` 2.2.2 :001 > module M; C = '1'; D = '2'; private_constant :D; end => M 2.2.2 :002 > M.constants => [:C] 2.2.2 :003 > M.freeze => M 2.2.2 :004 > M.private_constant :D => M 2.2.2 :005 > M.private_constant :C => M 2.2.2 :006 > M.constants => [] ``` -- https://bugs.ruby-lang.org/