aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2014-09-04 14:19:11 -0700
committerZachary Scott <e@zzak.io>2014-09-04 14:19:11 -0700
commit67463d5adc7d7d64e501bc3587106e638d154cc7 (patch)
tree776300ce08be5402054cedf793273a875987833c
parent181d4f21bf17d4c0b27efab794d3a9d54851cb20 (diff)
parentb947b6eca516fa08cd9a983c81c56af543e45dbf (diff)
downloadrails-67463d5adc7d7d64e501bc3587106e638d154cc7.tar.gz
rails-67463d5adc7d7d64e501bc3587106e638d154cc7.tar.bz2
rails-67463d5adc7d7d64e501bc3587106e638d154cc7.zip
Merge pull request #16803 from Peeja/methods-are-not-duplicable--update-guide
Document that method objects are not `duplicable?` [ci skip]
-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.