I am trying my hand on with mRuby. I compiled the mRuby source locally. I tried this simple example:
inc.rb
def test(a, b)
print "Inside the include->test(..)"
return a+b
end
test1.rb
require_relative 'inc.rb'
def helloworld(var1)
print 'hello world ' + var1 + ". Test number = " + test(4, 5)
end
helloworld('test')
test2.rb
require 'inc.rb'
def helloworld(var1)
print 'hello world ' + var1 + ". Test number = " + test(4, 5)
end
helloworld('test')
I executed both the test programs using mruby. mruby.exe test1.rb mruby.exe test2.rb
In both the cases I get the error:
"undefined method 'require_relative' for main (NoMethodError)"
"undefined method 'require' for main (NoMethodError)"
Does mRuby not support 'require'?