[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>

Hello,

9 messages 2017/10/04

[ruby-core:83169] [Ruby trunk Feature#13985] Avoid exception for #dup/#clone on Rational and Complex

From: eregontp@...
Date: 2017-10-06 20:59:58 UTC
List: ruby-core #83169
Issue #13985 has been reported by Eregon (Benoit Daloze).

----------------------------------------
Feature #13985: Avoid exception for #dup/#clone on Rational and Complex
https://bugs.ruby-lang.org/issues/13985

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 2.5
----------------------------------------
Since #12979, true/false/nil/Integer/Float just return themselves on #dup/#clone.

But it seems a few were missed, notably mentioned in https://bugs.ruby-lang.org/issues/12979#note-15.

Rational and Complex seems obvious candidates for supporting #dup/#clone returning itself as well since they are pretty much values.

Rational and Complex are currently not frozen though (see #13983).

Kasper (in the comment linked above) also mentions Method, but I think that's worth its own issue as it's no longer simple numeric values.

Note that BigDecimal is currently not frozen, but supports #dup/#clone (returning a new instance) (see #13984).



-- 
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