Skip to content

Commit 5e500c8

Browse files
committed
Add spec for binding Kernel#instance_of? on BasicObject
1 parent e51098f commit 5e500c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/ruby/core/unboundmethod/bind_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
@child2_um.bind(UnboundMethodSpecs::Child1.new).should be_kind_of(Method)
3333
end
3434

35+
it "allows binding a Kernel method retrieved from Object on BasicObject" do
36+
Object.instance_method(:instance_of?).bind(BasicObject.new).call(BasicObject).should == true
37+
end
38+
3539
it "returns a callable method" do
3640
obj = UnboundMethodSpecs::Methods.new
3741
@normal_um.bind(obj).call.should == obj.foo

0 commit comments

Comments
 (0)