Skip to content
instance method

UnboundMethod#clone

() -> self
method.clone → new_method

Returns a clone of this method.

Example
class A
  def foo
    return "bar"
  end
end

m = A.new.method(:foo)
m.call # => "bar"
n = m.clone.call # => "bar"
See also #bind_call #eql? #bind #hash also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0