using new macro approach for builtin, testing first

This commit is contained in:
2019-08-26 09:24:06 +03:00
parent b9bdc55059
commit 160d860db2
5 changed files with 92 additions and 2 deletions

13
lib/vool/builtin.rb Normal file
View File

@ -0,0 +1,13 @@
module Vool
module Builtin
def self.boot_methods(options)
return if options[:boot_methods] == false
load_builtin( :int_plus )
end
def self.load_builtin(name)
fname = "./builtin/#{name}.rb"
File.read File.expand_path(fname, File.dirname(__FILE__))
end
end
end

View File

@ -0,0 +1,5 @@
class Integer < DataObject4
def +(other)
return X.int_operator( :+ )
end
end