--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Bind umeth to obj. If Klass was the class from which umeth was obtained, obj.kind_of?(Klass) must be true. - !ruby/struct:SM::Flow::VERB body: " class A\n def test\n puts "In test, class = #{self.class}"\n end\n end\n class B < A\n end\n class C < B\n end\n\n um = B.instance_method(:test)\n bm = um.bind(C.new)\n bm.call\n bm = um.bind(B.new)\n bm.call\n bm = um.bind(A.new)\n bm.call\n" - !ruby/struct:SM::Flow::P body: produces: - !ruby/struct:SM::Flow::VERB body: " In test, class = C\n In test, class = B\n prog.rb:16:in `bind': bind argument must be an instance of B (TypeError)\n from prog.rb:16\n" full_name: UnboundMethod#bind is_singleton: false name: bind params: | umeth.bind(obj) -> method visibility: public