Actions
Bug #17738
closedRuby can still freeze ENV
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
Description
After https://bugs.ruby-lang.org/issues/15920 and https://github.com/ruby/ruby/commit/f53d7e4bfd604be6f8131c5460c29f4af16da117, ENV.freeze
raises TypeError.
But we can still freeze ENV as below.
Kernel.instance_method(:freeze).bind(ENV).call()
p ENV.frozen? #=> true
This loophole should be ignored?
Updated by marcandre (Marc-Andre Lafortune) almost 4 years ago
I believe so, yes.
Updated by jeremyevans0 (Jeremy Evans) almost 4 years ago
- Status changed from Open to Rejected
Actions
Like0
Like0Like0