We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 770cb60 commit e51098fCopy full SHA for e51098f
spec/ruby/core/unboundmethod/bind_spec.rb
@@ -26,6 +26,12 @@
26
@normal_um.bind(obj).should == obj.method(:foo)
27
end
28
29
+ it "returns Method for any object kind_of? the Module the method is defined in" do
30
+ @parent_um.bind(UnboundMethodSpecs::Child1.new).should be_kind_of(Method)
31
+ @child1_um.bind(UnboundMethodSpecs::Parent.new).should be_kind_of(Method)
32
+ @child2_um.bind(UnboundMethodSpecs::Child1.new).should be_kind_of(Method)
33
+ end
34
+
35
it "returns a callable method" do
36
obj = UnboundMethodSpecs::Methods.new
37
@normal_um.bind(obj).call.should == obj.foo
0 commit comments