more speration

Separating vm and parfait
especially in method this is hairy, lots of ripples
bug is back in sod (i hope thats a good thing)
This commit is contained in:
Torsten Ruger
2015-05-20 17:11:13 +03:00
parent d6d0f4f43a
commit 6eba363fb8
8 changed files with 44 additions and 23 deletions

View File

@ -14,15 +14,20 @@
module Parfait
class Module < Object
def initialize name , superclass
@name = name
@instance_methods = []
@name = name
@super_class = superclass
@meta_class = Virtual::MetaClass.new(self)
end
def name
@name
end
def add_instance_method method
raise "not a method #{method.class} #{method.inspect}" unless method.is_a? Method
raise "syserr " unless method.name.is_a? Symbol
raise "syserr #{method.name.class}" unless method.name.is_a? Word
method.for_class = self
@instance_methods << method
method