diff options
author | Peter Jaros <peter.a.jaros@gmail.com> | 2014-09-03 16:00:06 -0400 |
---|---|---|
committer | Peter Jaros <peter.a.jaros@gmail.com> | 2014-09-03 16:09:15 -0400 |
commit | fdc5e768ca29e3ad4288dcd8a8c7147cea8a1f97 (patch) | |
tree | 88508567e7a92ebebb516877a74d0062be5c8bb0 /activesupport/lib/active_support | |
parent | 66c9d31c2b9a58db03668fb0840669e4d4374123 (diff) | |
download | rails-fdc5e768ca29e3ad4288dcd8a8c7147cea8a1f97.tar.gz rails-fdc5e768ca29e3ad4288dcd8a8c7147cea8a1f97.tar.bz2 rails-fdc5e768ca29e3ad4288dcd8a8c7147cea8a1f97.zip |
Methods are not duplicable.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/duplicable.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/duplicable.rb b/activesupport/lib/active_support/core_ext/object/duplicable.rb index c5d59128e5..665cb0f96d 100644 --- a/activesupport/lib/active_support/core_ext/object/duplicable.rb +++ b/activesupport/lib/active_support/core_ext/object/duplicable.rb @@ -91,3 +91,13 @@ class BigDecimal # can't dup, so use superclass implementation end end + +class Method + # Methods are not duplicable: + # + # method(:puts).duplicable? # => false + # method(:puts).dup # => TypeError: allocator undefined for Method + def duplicable? + false + end +end |