Project

General

Profile

Actions

Feature #13984

closed

BigDecimal should be immutable/frozen and return itself on #dup

Added by Eregon (Benoit Daloze) over 6 years ago. Updated over 5 years ago.

Status:
Closed
Target version:
-
[ruby-core:83168]

Description

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.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #13985: Avoid exception for #dup/#clone on Rational and ComplexClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0