Sha256: 63d5abccdc906d21c054d6a7d3a88116d4f567b1a655c026251dd5c0343dac81
Contents?: true
Size: 732 Bytes
Versions: 6
Compression:
Stored size: 732 Bytes
Contents
require 'facets/basicobject' require 'test/unit' class TestBasicObject < Test::Unit::TestCase class A < BasicObject end def setup @a = A.new end def test_ignore_new_kernel_methods Kernel.module_eval { def xxx ; end } assert_raises(NoMethodError) { @a.xxx } end def test_ignore_new_object_methods Object.class_eval { def yyy ; end } assert_raises(NoMethodError) { @a.yyy } end #def test_006 # Object.class_eval { def yyy ; end } # assert( ! @a.object_self.methods.include?( 'yyy' ) ) #end #def test_007 # Object.class_eval { def yyy ; end } # assert( ! @a.object_class.method_defined?( :methods ) ) # assert( ! @a.object_self.methods.include?( :methods ) ) #end end
Version data entries
6 entries across 6 versions & 1 rubygems