[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:75017] [Ruby trunk Feature#12300] Allow Object#clone to take freeze: false keyword argument to not freeze the clone
From:
merch-redmine@...
Date:
2016-04-19 00:40:02 UTC
List:
ruby-core #75017
Issue #12300 has been reported by Jeremy Evans.
----------------------------------------
Feature #12300: Allow Object#clone to take freeze: false keyword argument to not freeze the clone
https://bugs.ruby-lang.org/issues/12300
* Author: Jeremy Evans
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
This allows Object#clone to not freeze the resulting object, which fixes a long standing problem in ruby in that you cannot get an unfrozen copy of an object that includes a copy of the object's singleton class. Previously, clone always returned a frozen object, and dup did not copy the singleton class. This adds the ability to get an unfrozen clone of an object that includes a copy of the object's singleton class, allowing further modification.
Among other things, this allows the ability to create modified clones of objects that have singleton classes:
~~~
class A
def clone(arg)
obj = super(freeze: false)
# modify obj based on arg
obj.freeze
end
end
~~~
I think this is a simpler and more flexible approach to the same problem that #12092 tries to solve.
---Files--------------------------------
0001-Allow-clone-to-take-freeze-false-keyword-argument-to.patch (3.93 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>