require 'lua' li = Lua.new() print "li.eval\n" li.eval( <100,'h2'=>'france'}] li.set('c', ar2) print "li.get('c')\n" li.get('c').each {|k,v| print "#{k} : #{v}\n"} def f(*a) a end li2 = Lua.new('strlib','mathlib') li2.eval('sl = strlen("car")') print "li2.get('sl') => x#{li2.get('sl')}x\n" li2.eval('sl = strlen("car")') print "li.get('sl') => x#{li.get('sl')}x\n" #v2 = li2.calling('car',34,[2,3,4]) #v1 = li.calling('car',34,[2,3,4]) #li.eval('fr = call_host("afunc","arg1","arg2")') #print "li.get('fr') => x#{li.get('fr')}x\n" #def li.calling(*args) # print( args.join(','), "\n") #end #def li2.calling(*args) # print( args.join(':'), "\n") #end #li.eval('fr = call_host("afunc","arg1","arg2",34, {2,8})') #li2.eval('fr = call_host("afunc","arg1","arg2",55)') #li.get('fr').each {|k,v| print "#{k} : #{v}\n"} rstr = 'Hello people' cd = li.setUserData('rstr',rstr) print li.get('rstr') print li.get('rstr')