Sha256: 82c0754cac08ed358c44ec1bb88c9d479e128d499b7752980943f98cad0e61ee
Contents?: true
Size: 377 Bytes
Versions: 50
Compression:
Stored size: 377 Bytes
Contents
module KernelExtendSpecs module Mod def foo; 3.142; end end class A extend Mod end end describe "Kernel#extend" do it "extends the class/module with the module" do KernelExtendSpecs::A.foo.should == 3.142 end it "extends the object with the module" do obj = Object.new obj.extend KernelExtendSpecs::Mod obj.foo.should == 3.142 end end
Version data entries
50 entries across 50 versions & 3 rubygems