Skip to content

Commit e51098f

Browse files
committed
Add back spec removed in 4e37db8ef56b77322cc415b202c68276bca1c4e6
* It's actually not behavior specific to Rubinius, it passes on MRI too.
1 parent 770cb60 commit e51098f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/ruby/core/unboundmethod/bind_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
@normal_um.bind(obj).should == obj.method(:foo)
2727
end
2828

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+
2935
it "returns a callable method" do
3036
obj = UnboundMethodSpecs::Methods.new
3137
@normal_um.bind(obj).call.should == obj.foo

0 commit comments

Comments
 (0)