implement how send should work (but parfait doesn't parse yet, so it doesnt)
This commit is contained in:
@ -77,7 +77,7 @@ module Virtual
|
||||
obj.add_instance_method Builtin::Object.send(f , @context)
|
||||
end
|
||||
obj = get_or_create_class :Kernel
|
||||
[:main , :__init__,:putstring,:exit].each do |f|
|
||||
[:main , :__init__,:putstring,:exit,:__send__].each do |f|
|
||||
obj.add_instance_method Builtin::Kernel.send(f , @context)
|
||||
end
|
||||
obj = get_or_create_class :Integer
|
||||
|
@ -24,6 +24,11 @@ module Virtual
|
||||
raise "Method not implemented #{clazz.name}.#{code.name}" unless method
|
||||
new_codes << FunctionCall.new( method )
|
||||
else
|
||||
# note: this is the current view: call internal send, even the method name says else
|
||||
# but send is "special" and accesses the internal method name and resolves.
|
||||
kernel = Virtual::BootSpace.space.get_or_create_class(:Kernel)
|
||||
method = kernel.get_instance_method(:__send__)
|
||||
new_codes << FunctionCall.new( method )
|
||||
raise "unimplemented #{code}"
|
||||
end
|
||||
else
|
||||
|
Reference in New Issue
Block a user