Sha256: 7fc4da98928f7704abc2dec2773fecdc1b6b5e712b338837a4396bff0a36c4c6
Contents?: true
Size: 483 Bytes
Versions: 83
Compression:
Stored size: 483 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Module#private" do it "should make the target method uncallable from other types" do obj = Object.new class << obj def foo; true; end end obj.foo.should == true class << obj private :foo end lambda { obj.foo }.should raise_error(NoMethodError) end end
Version data entries
83 entries across 83 versions & 1 rubygems