[ruby-core:93177] [Ruby trunk Bug#15920] Check frozen state of ENV
From:
nobu@...
Date:
2019-06-16 10:35:39 UTC
List:
ruby-core #93177
Issue #15920 has been updated by nobu (Nobuyoshi Nakada). jeremyevans0 (Jeremy Evans) wrote: > * Disallow modifying `ENV` after `ENV.freeze` (my original patch). I don't object this behavior itself, just don't consider the current behavior a bug, that is I don't think this should be backported. ---------------------------------------- Bug #15920: Check frozen state of ENV https://bugs.ruby-lang.org/issues/15920#change-78618 * 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) env-no-freeze.patch (1.78 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>