aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_support_core_extensions.md
diff options
context:
space:
mode:
authorPeter Jaros <peter.a.jaros@gmail.com>2014-09-04 15:08:07 -0400
committerPeter Jaros <peter.a.jaros@gmail.com>2014-09-04 15:09:07 -0400
commitb947b6eca516fa08cd9a983c81c56af543e45dbf (patch)
tree9e5314cbc084ca897f1245b4a6a7a8c231fac6de /guides/source/active_support_core_extensions.md
parent703a2e8da1d3a68b3902d9024c6f0d1cd32435aa (diff)
downloadrails-b947b6eca516fa08cd9a983c81c56af543e45dbf.tar.gz
rails-b947b6eca516fa08cd9a983c81c56af543e45dbf.tar.bz2
rails-b947b6eca516fa08cd9a983c81c56af543e45dbf.zip
Document that method objects are not `duplicable?`
Diffstat (limited to 'guides/source/active_support_core_extensions.md')
-rw-r--r--guides/source/active_support_core_extensions.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 965de0c761..88d651e13c 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -162,7 +162,7 @@ Active Support provides `duplicable?` to programmatically query an object about
false.duplicable? # => false
```
-By definition all objects are `duplicable?` except `nil`, `false`, `true`, symbols, numbers, class, and module objects.
+By definition all objects are `duplicable?` except `nil`, `false`, `true`, symbols, numbers, and class, module, and method objects.
WARNING: Any class can disallow duplication by removing `dup` and `clone` or raising exceptions from them. Thus only `rescue` can tell whether a given arbitrary object is duplicable. `duplicable?` depends on the hard-coded list above, but it is much faster than `rescue`. Use it only if you know the hard-coded list is enough in your use case.