File: C:/Ruby27-x64/share/ri/2.7.0/system/UnboundMethod/cdesc-UnboundMethod.ri
U:RDoc::NormalClass[iI"UnboundMethod:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"ERuby supports two forms of objectified methods. Class Method is ;TI"Eused to represent methods that are associated with a particular ;TI"Bobject: these method objects are bound to that object. Bound ;TI"Emethod objects for an object can be created using Object#method.;To:RDoc::Markup::BlankLine o; ;[
I"FRuby also supports unbound methods; methods objects that are not ;TI"Fassociated with a particular object. These can be created either ;TI"Hby calling Module#instance_method or by calling #unbind on a bound ;TI"Dmethod object. The result of both of these is an UnboundMethod ;TI"object.;T@o; ;[I"CUnbound methods can only be called after they are bound to an ;TI"Bobject. That object must be a kind_of? the method's original ;TI"class.;T@o:RDoc::Markup::Verbatim;[I"class Square
;TI" def area
;TI" @side * @side
;TI" end
;TI" def initialize(side)
;TI" @side = side
;TI" end
;TI" end
;TI"
;TI"-area_un = Square.instance_method(:area)
;TI"
;TI"s = Square.new(12)
;TI"area = area_un.bind(s)
;TI"area.call #=> 144
;T:@format0o; ;[I"FUnbound methods are a reference to the method at the time it was ;TI"Fobjectified: subsequent changes to the underlying class will not ;TI"affect the unbound method.;T@o;;[I"class Test
;TI" def test
;TI" :original
;TI" end
;TI" end
;TI"&um = Test.instance_method(:test)
;TI"class Test
;TI" def test
;TI" :modified
;TI" end
;TI" end
;TI"t = Test.new
;TI"%t.test #=> :modified
;TI"$um.bind(t).call #=> :original;T;0:
@fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0;
0;0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[[I"==;TI"../ruby-2.7.7/proc.c;T[I"
arity;T@Z[I" bind;T@Z[I"bind_call;T@Z[I"
clone;T@Z[I" eql?;T@Z[I" hash;T@Z[I"inspect;T@Z[I" name;T@Z[I"original_name;T@Z[I"
owner;T@Z[I"parameters;T@Z[I"source_location;T@Z[I"super_method;T@Z[I" to_s;T@Z[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;
0;0[I"proc.c;T@EcRDoc::TopLevel