bug hunting for class recreation
This commit is contained in:
parent
54b8a9f6de
commit
9c83423e50
@ -28,5 +28,19 @@ module Melon
|
||||
assert_equal :List , clazz.super_class_name
|
||||
end
|
||||
|
||||
def test_space_is_unchanged_by_compile
|
||||
space1 = Parfait.object_space.get_class_by_name(:Space)
|
||||
RubyCompiler.compile "class Space ;end"
|
||||
space2 = Parfait.object_space.get_class_by_name(:Space)
|
||||
assert_equal space1 , space2
|
||||
end
|
||||
|
||||
def test_space_type_is_unchanged_by_compile
|
||||
space1 = Parfait.object_space.get_class_by_name(:Space).instance_type
|
||||
RubyCompiler.compile "class Space ;end"
|
||||
space2 = Parfait.object_space.get_class_by_name(:Space).instance_type
|
||||
assert_equal space1 , space2
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -9,9 +9,9 @@ module Melon
|
||||
end
|
||||
|
||||
def create_method
|
||||
RubyCompiler.compile in_Space("def meth; @ivar ;end")
|
||||
space = Parfait.object_space.get_class
|
||||
space.get_method(:meth)
|
||||
RubyCompiler.compile in_Test("def meth; @ivar ;end")
|
||||
test = Parfait.object_space.get_class_by_name(:Test)
|
||||
test.get_method(:meth)
|
||||
end
|
||||
|
||||
def test_creates_method_in_class
|
||||
|
Loading…
Reference in New Issue
Block a user