From: nobu@... Date: 2019-06-14T12:25:15+00:00 Subject: [ruby-core:93139] [Ruby trunk Bug#15920] Check frozen state of ENV Issue #15920 has been updated by nobu (Nobuyoshi Nakada). I don't think this behavior a bug. `ENV` is an interface to the system environment variables, so freezing it doesn't affect the underlying system. And be careful that an object can never be unfrozen anymore, once it got frozen. For what purpose do you need to prohibit modifying environment variables, and is `ENV.freeze` good for it? ---------------------------------------- Bug #15920: Check frozen state of ENV https://bugs.ruby-lang.org/issues/15920#change-78568 * Author: kachick (Kenichi Kamiya) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- github: https://github.com/ruby/ruby/pull/2234 Is this an intentional behavior? ``` ruby ENV.freeze ENV.clear #=> No exception happen ``` raising FronzenError sounds reasonable to me ---Files-------------------------------- env-frozen.patch (3.9 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: