[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[#63391] Access Modifiers (Internal Interfaces) — Daniel da Silva Ferreira <danieldasilvaferreira@...>
Hi,
3 messages
2014/06/28
[ruby-core:63194] [ruby-trunk - Feature #2509] Recursive freezing?
From:
ruby-core@...
Date:
2014-06-16 15:44:50 UTC
List:
ruby-core #63194
Issue #2509 has been updated by Marc-Andre Lafortune.
I think we can get the effect of having an error for edge cases (deep freezing a class, for example) by simply removing `Module#deep_freeze`. I feel there's no need to add a new method like `insulated?`, simply ask instead `respond_to?(:deep_freeze)`.
----------------------------------------
Feature #2509: Recursive freezing?
https://bugs.ruby-lang.org/issues/2509#change-47245
* Author: Marc-Andre Lafortune
* Status: Rejected
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: core
* Target version: next minor
----------------------------------------
=begin
I like freezing my constants, config files I read, etc... I believe it is the typical use case for #freeze.
In all theses cases, what I really want to do is freeze everything. There is often no easy way to do this (e.g. for config files), or else one must explicitly call freeze a bunch of times, like:
DEFAULT_SEND_FILE_OPTIONS = {
:type => 'application/octet-stream'.freeze,
:disposition => 'attachment'.freeze,
}.freeze
It would be very nice if there was an easy way to freeze recursively arrays, hashes, etc...
A solution would be for #freeze to accept a level argument (similar to flatten, but the default being 1), or alternatively a boolean one (recursive = false).
Should I write a patch for this feature request?
Thanks,
Marc-Andr辿
=end
---Files--------------------------------
deep_freeze.pdf (90.8 KB)
--
https://bugs.ruby-lang.org/