Fix calling unknown methods

Before, when the type was determined, it was assumed that the method can be resolved. But off course tis is not true, as methods may be defined later in the file.
Two solutions for that. One could  (and should) define all methods and only then start to compile. Thus having the type safety.
Or (as now) make a dynamic call and let it fail at runtime.
This commit is contained in:
2019-08-14 14:59:54 +03:00
parent 1dad6dee7a
commit d6c38d15ba
3 changed files with 33 additions and 8 deletions

View File

@ -125,7 +125,6 @@ module RubyX
parfait = ["object"]
parfait.each do |file|
path = File.expand_path("../../parfait/#{file}.rb",__FILE__)
puts "Loading #{path}"
ruby_to_vool(File.read(path))
end
end