[ruby-cvs:79059] 04eb7c7e46 (master): Call initialize_clone with freeze: false if clone called with freeze: false

"Jeremy Evans" <[email protected]> Sat, 4 Jan 2020 13:13:28 +0900 (JST)
Newsgroups gmane.comp.lang.ruby.cvs
Message-ID <[email protected]>
Jeremy Evans	2019-08-26 13:11:46 +0900 (Mon, 26 Aug 2019)

  New Revision: 04eb7c7e46

  https://github.com/ruby/ruby/commit/04eb7c7e46

  Log:
    Call initialize_clone with freeze: false if clone called with freeze:=
 false
    =

    This makes it possible to initialize_clone to correctly not freeze
    internal state if the freeze: false keyword is passed to clone.
    =

    If clone is called with freeze: true or no keyword, do not pass
    a second argument to initialize_clone to keep backwards
    compatibility.
    =

    This makes it so that external libraries that override
    initialize_clone but do not support the freeze keyword will fail
    with ArgumentError if passing freeze: false to clone.  I think that
    is better than the current behavior, which succeeds but results in
    an unfrozen object with frozen internals.
    =

    Fix related issues in set and delegate in stdlib.
    =

    Fixes [Bug #14266]

  Modified files:
    lib/delegate.rb
    lib/set.rb
    object.c
    test/ruby/test_module.rb
    test/ruby/test_object.rb
    test/test_delegate.rb
    test/test_set.rb=