This project is archived and is in readonly mode.

#2900 ✓wontfix
Xavier Noria

deprecate duplicable? and remove it from the framework

Reported by Xavier Noria | July 11th, 2009 @ 01:40 AM | in 2.x

Active Support has a predicate called duplicable? that returns true/false according to a hard-coded list of cases. For example strings are duplicable? but numbers are not.

That's used in the framework to conditionally call dup/clone on arbitrary values. However, classes have means to disallow duplication, like removing dup/clone or raising exceptions from them, so that technique is not generic enough.

This patch replaces usage of duplicable? in Rails with a robust rescue idiom, and deprecates the predicate itself.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>