[ruby-core:84230] [Ruby trunk Feature#13984] BigDecimal should be immutable/frozen and return itself on #dup

From: muraken@...
Date: 2017-12-13 02:45:28 UTC
List: ruby-core #84230
Issue #13984 has been updated by mrkn (Kenta Murata).


I decided to make a BigDecimal is frozen and remove dup-support.
But it introduces incompatibilities, so during Ruby 2.5 period, I'll make them deprecated and issue warning messages.

----------------------------------------
Feature #13984: BigDecimal should be immutable/frozen and return itself on #dup
https://bugs.ruby-lang.org/issues/13984#change-68356

* Author: Eregon (Benoit Daloze)
* Status: Assigned
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* Target version: 
----------------------------------------
Currently, BigDecimal instances are not frozen, and supports #dup by returning a new instance.

In the spirit of #12979 and #13983, I think BigDecimal instances should always be frozen.
Then BigDecimal#dup/clone should just return the same instance.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next