rename singleton_class to single_class and misc

was clashing with real ruby method name
also many superclass mismatch fixes
some misc
This commit is contained in:
2019-09-24 17:25:19 +03:00
parent dd810cfc49
commit 3df54910cc
29 changed files with 87 additions and 35 deletions

View File

@ -19,7 +19,7 @@ module Vool
end
def setup
source = "class Integer;def +(other);X.int_operator(:+);end;end;" + class_main
source = "class Integer<Data4;def +(other);X.int_operator(:+);end;end;" + class_main
ret = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_mom(source)
@ins = ret.compilers.find{|c|c.callable.name==:main}.mom_instructions.next
end

View File

@ -27,7 +27,7 @@ module Vool
def test_class_inst
space_class = Parfait.object_space.get_class
assert_equal :Space , space_class.name
names = space_class.singleton_class.instance_type.names
names = space_class.single_class.instance_type.names
assert names.index_of(:inst) , names
end
def test_compiler

View File

@ -7,7 +7,7 @@ module Vool
def class_main
<<-eos
class Object
class Space
def self.one_plus()
return 1 + 1
end