[#73707] [Ruby trunk Misc#12004] Code of Conduct — hanmac@...
Issue #12004 has been updated by Hans Mackowiak.
3 messages
2016/02/05
[#73730] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/07
[#73746] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/09
[#73919] [Ruby trunk Feature#11262] Make more objects behave like "Functions" — Ruby-Lang@...
SXNzdWUgIzExMjYyIGhhcyBiZWVuIHVwZGF0ZWQgYnkgSsO2cmcgVyBNaXR0YWcuCgpQcm9qZWN0
3 messages
2016/02/22
[#74019] [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression. — duerst@...
SXNzdWUgIzEyMTAzIGhhcyBiZWVuIHVwZGF0ZWQgYnkgTWFydGluIETDvHJzdC4KClN0YXR1cyBj
3 messages
2016/02/27
[ruby-core:73898] [Ruby trunk Feature#12092] Allow Object#clone to yield cloned object before freezing
From:
merch-redmine@...
Date:
2016-02-19 20:34:44 UTC
List:
ruby-core #73898
Issue #12092 has been reported by Jeremy Evans.
----------------------------------------
Feature #12092: Allow Object#clone to yield cloned object before freezing
https://bugs.ruby-lang.org/issues/12092
* Author: Jeremy Evans
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
This allows creating modified clones of frozen objects that have
singleton classes:
~~~
a = [1,2,3]
def a.fl; first + last; end
a.freeze
a.fl # => 4
clone = a.clone{|c| c << 10}
clone.last # => 10
clone.fl # => 11
clone.frozen? # => true
~~~
Previously, this was not possible at all. If an object was
frozen, the clone was frozen before the cloned object could
be modified. It was possible to modify the clone using
initialize_clone or initialize_copy, but you couldn't change how
to modify the clone on a per-call basis. You couldn't use dup
to return an unfrozen copy, modify it, and then freeze it, because
dup doesn't copy singleton classes.
This allows ruby to be used in a functional style with immutable
data structures, while still keeping the advantages of singleton
classes.
---Files--------------------------------
0001-Allow-clone-to-yield-cloned-object-before-freezing.patch (2.51 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>