W3cubDocs

/Ruby on Rails 5.0

class Method

Parent:
Object

Public Instance Methods

duplicable?() Show source

Methods are not duplicable:

method(:puts).duplicable? # => false
method(:puts).dup         # => TypeError: allocator undefined for Method
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 121
def duplicable?
  false
end

© 2004–2017 David Heinemeier Hansson
Licensed under the MIT License.